diff --git a/AUTHORS.txt b/AUTHORS.txt index 7e8e919682c..34feb3838f5 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -30,6 +30,7 @@ ACCtomeek Adanteh aeroson Aggr094 +Anthariel BlackQwar Brakoviejo Codingboy @@ -47,15 +48,19 @@ GieNkoV gpgpgpgp Grzegorz Hamburger SV +Harakhti havena Hawkins jokoho48 Jonpas +Kllrt Legolasindar "Viper" licht-im-Norden87 MarcBook +meat Michail Nikolaev nic547 +nomisum oscarmolinadev pokertour rakowozz @@ -69,3 +74,8 @@ Tourorist Valentin Torikian zGuba Aleksey EpMAK Yermakov +ruPaladin +BlackPixxel +Asgar Serran +Kavinsky +Coren diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll new file mode 100644 index 00000000000..568e7c16db7 Binary files /dev/null and b/ace_advanced_ballistics.dll differ diff --git a/ace_breakLine.dll b/ace_breakLine.dll new file mode 100644 index 00000000000..edd00c78eb0 Binary files /dev/null and b/ace_breakLine.dll differ diff --git a/ace_fcs.dll b/ace_fcs.dll index 2cb8b86de25..3385e53463f 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 00000000000..d1462b144fb --- /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 00000000000..cc1414eb8fa --- /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 00000000000..8e6e40e21e1 --- /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 00000000000..ef98bcd2b67 --- /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 00000000000..b62af875d23 --- /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 00000000000..176fe700a79 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 00000000000..1114b418262 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 00000000000..a97be42a73b 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 00000000000..783a5be5694 --- /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 00000000000..b58a2b88e81 --- /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 00000000000..32f1406a07b --- /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 00000000000..ea7a77e8375 --- /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 00000000000..c92e679a662 --- /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 00000000000..02e849399ee --- /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 00000000000..b4cbd5bdc0c --- /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 00000000000..433dafbe100 --- /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 00000000000..08ae44cc742 --- /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 00000000000..81b71aeb3b5 --- /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 00000000000..e7b0a322e8d --- /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 00000000000..5fbdf2f12a8 --- /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 { false }; +if (vehicle ACE_player != ACE_player) exitWith { false }; +if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false }; + +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 00000000000..d628f012ee7 --- /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 00000000000..ba7ea31a8f1 --- /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 00000000000..6791d26350f --- /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 00000000000..2c718bf9dba --- /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 00000000000..59866576aab --- /dev/null +++ b/addons/advanced_ballistics/initKeybinds.sqf @@ -0,0 +1,10 @@ +["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}, +[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 00000000000..273afa2f49d --- /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 00000000000..f19aa1e672c --- /dev/null +++ b/addons/advanced_ballistics/stringtable.xml @@ -0,0 +1,16 @@ + + + + + + Show Wind Info + Pokaż inf. o wietrze + Mostra indicazioni del vento + + + Show Protractor + Pokaż kątomierz + Mostra il rapportatore + + + diff --git a/addons/ai/CfgWeapons.hpp b/addons/ai/CfgWeapons.hpp index 22e8f703fcb..be3245cce37 100644 --- a/addons/ai/CfgWeapons.hpp +++ b/addons/ai/CfgWeapons.hpp @@ -574,4 +574,198 @@ class CfgWeapons { maxRange = 1200; //1000; }; }; + + // marksmen marksmen + class DMR_03_base_F: Rifle_Long_Base_F { + modes[] += {"ACE_Burst_far"}; + + class Single: Mode_SemiAuto { + minRange = 120; // 2; + minRangeProbab = 0.7; // 0.3; + midRangeProbab = 0.3; // 0.7; + }; + + class FullAuto; + + class single_close_optics1: Single { + minRange = 120; // 2; + minRangeProbab = 0.8; // 0.05; + midRangeProbab = 0.05; // 0.8; + }; + + class single_medium_optics1: single_close_optics1 { + minRangeProbab = 0.7; // 0.05; + midRangeProbab = 0.05; // 0.7; + }; + + class single_far_optics1: single_medium_optics1 { + minRange = 400; // 300; + minRangeProbab = 0.5; // 0.05; + midRangeProbab = 0.05; // 0.5; + }; + + class fullauto_medium: FullAuto { + minRange = 20; // 2; + maxRange = 150; // 100; + burst = "3 + round random 5"; // 3; + }; + + class ACE_Burst_far: fullauto_medium { + aiRateOfFire = 2.0; + aiRateOfFireDistance = 500; + minRange = 400; + minRangeProbab = 0.1; + midRange = 500; + midRangeProbab = 0.2; + maxRange = 600; + maxRangeProbab = 0.2; + burst = "2 + round random 3"; + }; + }; + + class DMR_05_base_F: Rifle_Long_Base_F { + modes[] += {"ACE_Burst_far"}; + + class Single: Mode_SemiAuto { + minRange = 120; // 2; + minRangeProbab = 0.7; // 0.3; + midRangeProbab = 0.3; // 0.7; + }; + + class FullAuto; + + class single_close_optics1: Single { + minRange = 120; // 2; + minRangeProbab = 0.8; // 0.05; + midRangeProbab = 0.05; // 0.8; + }; + + class single_medium_optics1: single_close_optics1 { + minRangeProbab = 0.7; // 0.05; + midRangeProbab = 0.05; // 0.7; + }; + + class single_far_optics1: single_medium_optics1 { + minRange = 400; // 300; + minRangeProbab = 0.5; // 0.05; + midRangeProbab = 0.05; // 0.5; + }; + + class fullauto_medium: FullAuto { + minRange = 20; // 2; + maxRange = 150; // 100; + burst = "3 + round random 5"; // 3; + }; + + class ACE_Burst_far: fullauto_medium { + aiRateOfFire = 2.0; + aiRateOfFireDistance = 500; + minRange = 400; + minRangeProbab = 0.1; + midRange = 500; + midRangeProbab = 0.2; + maxRange = 600; + maxRangeProbab = 0.2; + burst = "2 + round random 3"; + }; + }; + + class DMR_06_base_F: Rifle_Long_Base_F { + modes[] += {"ACE_Burst_far"}; + + class Single: Mode_SemiAuto { + minRange = 120; // 2; + minRangeProbab = 0.7; // 0.3; + midRangeProbab = 0.3; // 0.7; + }; + + class FullAuto; + + class single_close_optics1: Single { + minRange = 120; // 2; + minRangeProbab = 0.8; // 0.05; + midRangeProbab = 0.05; // 0.8; + }; + + class single_medium_optics1: single_close_optics1 { + minRangeProbab = 0.7; // 0.05; + midRangeProbab = 0.05; // 0.7; + }; + + class single_far_optics1: single_medium_optics1 { + minRange = 400; // 300; + minRangeProbab = 0.5; // 0.05; + midRangeProbab = 0.05; // 0.5; + }; + + class fullauto_medium: FullAuto { + minRange = 20; // 2; + maxRange = 150; // 100; + burst = "3 + round random 5"; // 3; + }; + + class ACE_Burst_far: fullauto_medium { + aiRateOfFire = 2.0; + aiRateOfFireDistance = 500; + minRange = 400; + minRangeProbab = 0.1; + midRange = 500; + midRangeProbab = 0.2; + maxRange = 600; + maxRangeProbab = 0.2; + burst = "2 + round random 3"; + }; + }; + + // marksmen medium mg + class MMG_01_base_F: Rifle_Long_Base_F { + aiDispersionCoefY = 25.0; + aiDispersionCoefX = 20.0; + modes[] += {"ACE_Burst_far"}; + + class manual; + class burst; + class close; + class short; + class medium; + class ACE_Burst_far: medium { + aiRateOfFire = 6.0; + aiRateOfFireDistance = 900; + minRange = 700; + minRangeProbab = 0.1; + midRange = 900; + midRangeProbab = 0.2; + maxRange = 1100; + maxRangeProbab = 0.2; + burst = "3 + round random 5"; + }; + + class far_optic1; + class far_optic2; + }; + + class MMG_02_base_F: Rifle_Long_Base_F { + aiDispersionCoefY = 20.0; + aiDispersionCoefX = 15.0; + modes[] += {"ACE_Burst_far"}; + + class manual; + class close; + class short; + class medium; + class ACE_Burst_far: medium { + aiRateOfFire = 6.0; + aiRateOfFireDistance = 900; + minRange = 700; + minRangeProbab = 0.1; + midRange = 900; + midRangeProbab = 0.2; + maxRange = 1100; + maxRangeProbab = 0.2; + burst = "3 + round random 5"; + }; + + class far_optic1; + class far_optic2; + }; }; diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index f29c1d56d67..41462354d8f 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -16,7 +16,7 @@ class CfgAmmo { explosionEffects = "ExploAmmoExplosion"; model = "\A3\Weapons_f\Data\bullettracer\tracer_red"; }; - class ACE_20mm_HEDP : B_20mm {}; + class ACE_20mm_HE : B_20mm {}; class ACE_20mm_AP : B_20mm { hit = 50; indirectHit = 12; diff --git a/addons/aircraft/CfgMagazines.hpp b/addons/aircraft/CfgMagazines.hpp index 24451821638..b09bac6943f 100644 --- a/addons/aircraft/CfgMagazines.hpp +++ b/addons/aircraft/CfgMagazines.hpp @@ -10,7 +10,7 @@ class CfgMagazines { // an extended magazine for the comanche class 300Rnd_20mm_shells; class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells { - ammo = "ACE_20mm_HEDP"; + ammo = "ACE_20mm_HE"; count = 500; }; }; diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 4d1c49fff64..57fecc2a440 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -1,50 +1,51 @@  - - - - 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 Rampe 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 + Rakodórámpa nyitása + Открыть грузовой отсек + Apri la porta del cargo + + + Close Cargo Door + Laderampe schließen + Cerrar compuerta de carga + Fermer rampe cargo + Zamknij drzwi ładowni + Zavřít nákladní prostor + Rakodórámpa zárása + Закрыть грузовой отсек + Chiudi la porta del cargo + + diff --git a/addons/atragmx/CfgEventHandlers.hpp b/addons/atragmx/CfgEventHandlers.hpp new file mode 100644 index 00000000000..3996e3371d4 --- /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 00000000000..f015f0e0b9b --- /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 00000000000..07d2fa4aeef --- /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 00000000000..f68b38c4a32 --- /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 00000000000..8c0a6478394 --- /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 00000000000..5708a35786c 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 00000000000..e233e510ef4 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 00000000000..31c526fab79 --- /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 00000000000..91024d05a3c --- /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 00000000000..3abe32ba34d --- /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 00000000000..d82ac22f42b 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 00000000000..5bd4ef36e57 --- /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 00000000000..0938d580de0 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 00000000000..89744d13afd 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 00000000000..bac04c2e074 --- /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 00000000000..05625a53f6c --- /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 00000000000..4822b08b37c --- /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 00000000000..90263a608c7 --- /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 00000000000..6280f19339b --- /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 00000000000..57783d9ccad --- /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 00000000000..7ee7e9ff781 --- /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 00000000000..7054e85cf92 --- /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 00000000000..259441d51da --- /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 00000000000..01cdcba1845 --- /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 00000000000..9de1baee613 --- /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 00000000000..99704220d4f --- /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 00000000000..d16e1f84a06 --- /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 00000000000..3f46a71fe2c --- /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 00000000000..4a525dcad82 --- /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 00000000000..1a20af74522 --- /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 00000000000..d797939991f --- /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 00000000000..12815194dd6 --- /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 00000000000..c34784e27ac --- /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 00000000000..5eaf5eb5605 --- /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 00000000000..655630f6c5f --- /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 00000000000..3ed8cb51841 --- /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 00000000000..964e5f93d01 --- /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 00000000000..ce1e8588b99 --- /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 00000000000..5b809b7ca9e --- /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 00000000000..650993cff3a --- /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 00000000000..90acd1a84fd --- /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 00000000000..4e24e4cb774 --- /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 00000000000..6a5c386de73 --- /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 00000000000..28534c9dd98 --- /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 00000000000..352a6d0e1f0 --- /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 00000000000..0bda7ad0197 --- /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 00000000000..91f1831b04f --- /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 00000000000..cd80e5f1226 --- /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 00000000000..546c38d24c7 --- /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 00000000000..378124ad4f2 --- /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 00000000000..11ff8a314e3 --- /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 00000000000..2a4435c376f --- /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 00000000000..18d7a72cd22 --- /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 00000000000..d48412def08 --- /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 00000000000..dacc2280325 --- /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 00000000000..15e65c38a63 --- /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 00000000000..6e49f396953 --- /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 00000000000..d8a69a09e3d --- /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}, +[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) \ No newline at end of file diff --git a/addons/kestrel/script_component.hpp b/addons/atragmx/script_component.hpp similarity index 50% rename from addons/kestrel/script_component.hpp rename to addons/atragmx/script_component.hpp index a38231c5119..062df59d197 100644 --- a/addons/kestrel/script_component.hpp +++ b/addons/atragmx/script_component.hpp @@ -1,12 +1,12 @@ -#define COMPONENT kestrel +#define COMPONENT atragmx #include "\z\ace\addons\main\script_mod.hpp" -#ifdef DEBUG_ENABLED_KESTREL +#ifdef DEBUG_ENABLED_ATRAGMX #define DEBUG_MODE_FULL #endif -#ifdef DEBUG_ENABLED_KESTREL - #define DEBUG_SETTINGS DEBUG_ENABLED_KESTREL +#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 00000000000..6b6a921c2a6 --- /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/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp index d63b8db36b6..a000222adc0 100644 --- a/addons/attach/CfgMagazines.hpp +++ b/addons/attach/CfgMagazines.hpp @@ -2,11 +2,31 @@ class CfgMagazines { class CA_Magazine; class B_IR_Grenade: CA_Magazine { - ACE_Attachable = 1; + ACE_Attachable = "B_IRStrobe"; + }; + + class O_IR_Grenade: B_IR_Grenade { + ACE_Attachable = "O_IRStrobe"; + }; + + class I_IR_Grenade: B_IR_Grenade { + ACE_Attachable = "I_IRStrobe"; }; class SmokeShell; class Chemlight_green: SmokeShell { - ACE_Attachable = 1; + ACE_Attachable = "Chemlight_green"; + }; + + class Chemlight_blue: Chemlight_green { + ACE_Attachable = "Chemlight_blue"; + }; + + class Chemlight_red: Chemlight_green { + ACE_Attachable = "Chemlight_red"; + }; + + class Chemlight_yellow: Chemlight_green { + ACE_Attachable = "Chemlight_yellow"; }; }; diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp index 4ad34832c5a..9734ceb273d 100644 --- a/addons/attach/CfgWeapons.hpp +++ b/addons/attach/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class InventoryItem_Base_F; class ACE_IR_Strobe_Item: ACE_ItemCore { - ACE_attachable = 1; + ACE_attachable = "ACE_IR_Strobe_Effect"; author = "$STR_ACE_Common_ACETeam"; scope = 2; displayName = "$STR_ACE_IrStrobe_Name"; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 3703514fb6c..3bb54eee168 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -25,35 +25,19 @@ _itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam; //Sanity Check (_unit has item in inventory, not over attach limit) if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");}; -_itemVehClass = ""; -_onAtachText = ""; _selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"]; -switch (true) do { -case (_itemClassname == "ACE_IR_Strobe_Item"): { - _itemVehClass = "ACE_IR_Strobe_Effect"; - _onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached"; - //_selfAttachPosition = [_unit, [0, -0.11, 0.16], "pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri - }; -case (_itemClassname == "B_IR_Grenade"): { - _itemVehClass = "B_IRStrobe"; - _onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached"; - }; -case (_itemClassname == "O_IR_Grenade"): { - _itemVehClass = "O_IRStrobe"; - _onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached"; - }; -case (_itemClassname == "I_IR_Grenade"): { - _itemVehClass = "I_IRStrobe"; - _onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached"; - }; -case (toLower _itemClassname in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]): { - _itemVehClass = _itemClassname; - _onAtachText = localize "STR_ACE_Attach_Chemlight_Attached"; - }; +_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable"); +_onAtachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName"); + +if (_itemVehClass == "") then { + _itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_Attachable"); + _onAtachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName"); }; -if (_itemVehClass == "") exitWith {ERROR("no _itemVehClass for Item");}; +if (_itemVehClass == "") exitWith {ERROR("no ACE_Attachable for Item");}; + +_onAtachText = format [localize "STR_ACE_Attach_Item_Attached", _onAtachText]; if (_unit == _attachToVehicle) then { //Self Attachment _unit removeItem _itemClassname; // Remove item diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 124e5910d62..99ac6460132 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -73,14 +73,9 @@ _attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true]; _attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true]; // Display message -switch (true) do { -case (_itemName == "ACE_IR_Strobe_Item") : { - [localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured); - }; -case (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) : { - [localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured); - }; -case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]) : { - [localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured); - }; +_itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName"); +if (_itemDisplayName == "") then { + _itemDisplayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName"); }; + +[format [localize "STR_ACE_Attach_Item_Detached", _itemDisplayName]] call EFUNC(common,displayTextStructured); diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index 6ff9410475e..3594e10bd60 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -26,7 +26,7 @@ _actions = []; if !(_x in _listed) then { _listed pushBack _x; _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber (_item >> "ACE_Attachable") == 1) then { + if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); _action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); @@ -39,7 +39,7 @@ _actions = []; if !(_x in _listed) then { _listed pushBack _x; _item = ConfigFile >> "CfgWeapons" >> _x; - if (getNumber (_item >> "ACE_Attachable") == 1) then { + if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); _action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 839ac2e168a..e950d6ea594 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -1,181 +1,207 @@  - - - - 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 du Attacher - Befestigen fehlgeschlagen - Соединение прервано - Error al acoplar - - - \ No newline at end of file + + + 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ę + Hozzácsatolás sikertelen + + + %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 79f99c33a4e..87f3a99df18 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,568 @@ 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 B_556x45_Ball_Tracer_Yellow; + class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Yellow { + 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_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow { + nvgOnly = 1; + }; + class B_65x39_Caseless_green; + class ACE_65x39_Caseless_green_Tracer_Dim : B_65x39_Caseless_green { + nvgOnly = 1; + }; + class ACE_65x47_Ball_Scenar: B_65x39_Caseless + { + airFriction=-0.00078; + typicalSpeed=820 ; + ACE_caliber=0.264; + ACE_bulletLength=1.364; + ACE_bulletMass=139; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.290}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={760, 790, 820, 830}; + ACE_barrelLengths[]={16, 20, 24, 26}; + }; + 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_Yellow; + class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Yellow { + 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_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball + { + airFriction=-0.000830; + caliber=1.08; + hit=17; + typicalSpeed=900; + ACE_caliber=0.308; + ACE_bulletLength=1.353; + ACE_bulletMass=190; + 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.268}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={865, 900, 924}; + ACE_barrelLengths[]={20, 24, 26}; + }; + class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball + { + airFriction=-0.000815; + caliber=1.12; + hit=18; + typicalSpeed=867; + ACE_caliber=0.308; + ACE_bulletLength=1.489; + ACE_bulletMass=220; + 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.310}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={847, 867, 877}; + ACE_barrelLengths[]={20, 24, 26}; + }; + class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball + { + airFriction=-0.00076; + caliber=1.15; + hit=19; + typicalSpeed=853; + ACE_caliber=0.308; + ACE_bulletLength=1.602; + ACE_bulletMass=230; + 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="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={800, 853, 884}; + ACE_barrelLengths[]={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 { + airFriction=-0.001023; + 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_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 B_762x54_Tracer_Green; + class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { + 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_Yellow { + 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 { + airFriction=-0.00106; + typicalSpeed=880; + 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 B_338_Ball : BulletBase { + airFriction=-0.00061 + typicalSpeed=915; + 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 { + airFriction=-0.000537; + typicalSpeed=820; + 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 ACE_338_Ball : B_338_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[]={800, 820, 826, 830}; + ACE_barrelLengths[]={20, 24, 26.5, 28}; + }; + class B_127x54_Ball : BulletBase { + airFriction=-0.00014; + typicalSpeed=300; + ACE_caliber=0.510; + ACE_bulletLength=2.540; + ACE_bulletMass=750; + 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 00000000000..de3f80fd835 --- /dev/null +++ b/addons/ballistics/CfgMagazines.hpp @@ -0,0 +1,242 @@ + +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 ACE_100Rnd_65x39_caseless_mag_Tracer_Dim: 100Rnd_65x39_caseless_mag_Tracer { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_65x39_Caseless_Tracer_Dim"; + displayName = "$STR_ACE_100Rnd_65x39_caseless_mag_Tracer_DimName"; + displayNameShort = "$STR_ACE_100Rnd_65x39_caseless_mag_Tracer_DimNameShort"; + descriptionShort = "$STR_ACE_100Rnd_65x39_caseless_mag_Tracer_DimDescription"; + picture = "\A3\weapons_f\data\ui\m_100rnd_65x39_yellow_ca.paa"; + }; + class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { + initSpeed = 760; + }; + class ACE_200Rnd_65x39_cased_Box_Tracer_Dim: 200Rnd_65x39_cased_Box { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_65x39_Caseless_Tracer_Dim"; + displayName = "$STR_ACE_200Rnd_65x39_cased_Box_Tracer_DimName"; + displayNameShort = "$STR_ACE_200Rnd_65x39_cased_Box_Tracer_DimNameShort"; + descriptionShort = "$STR_ACE_200Rnd_65x39_cased_Box_Tracer_DimDescription"; + picture = "\A3\weapons_f\data\ui\m_200rnd_65x39_yellow_ca.paa"; + }; + 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_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"; + }; + 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_65x39_Caseless_green_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"; + }; + + class 30Rnd_556x45_Stanag: CA_Magazine { + }; + class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_556x45_Ball_Mk262"; + displayName = "$STR_ACE_30Rnd_556x45_Stanag_Mk262_mag_Name"; + displayNameShort = "$STR_ACE_30Rnd_556x45_Stanag_Mk262_mag_NameShort"; + descriptionShort = "$STR_ACE_30Rnd_556x45_Stanag_Mk262_mag_Description"; + initSpeed = 832; + }; + class ACE_30Rnd_556x45_Stanag_Mk318_mag: 30Rnd_556x45_Stanag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_556x45_Ball_Mk318"; + displayName = "$STR_ACE_30Rnd_556x45_Stanag_Mk318_mag_Name"; + displayNameShort = "$STR_ACE_30Rnd_556x45_Stanag_Mk318_mag_NameShort"; + descriptionShort = "$STR_ACE_30Rnd_556x45_Stanag_Mk318_mag_Description"; + initSpeed = 922; + }; + 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_20stanag_red_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 { + 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 ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x51_Ball_M118LR"; + count=10; + displayName = "$STR_ACE_10Rnd_762x51_M118LR_Mag_Name"; + displayNameShort = "$STR_ACE_10Rnd_762x51_M118LR_Mag_NameShort"; + descriptionShort = "$STR_ACE_10Rnd_762x51_M118LR_Mag_Description"; + initSpeed = 780; + }; + class ACE_20Rnd_762x51_M118LR_Mag: 20Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x51_Ball_M118LR"; + displayName = "$STR_ACE_20Rnd_762x51_M118LR_Mag_Name"; + displayNameShort = "$STR_ACE_20Rnd_762x51_M118LR_Mag_NameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x51_M118LR_Mag_Description"; + initSpeed = 780; + }; + class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 20Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x67_Ball_Mk248_Mod_0"; + displayName = "$STR_ACE_20Rnd_762x67_Mk248_Mod_0_Mag_Name"; + displayNameShort = "$STR_ACE_20Rnd_762x67_Mk248_Mod_0_Mag_NameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x67_Mk248_Mod_0_Mag_Description"; + initSpeed = 900; + }; + class ACE_20Rnd_762x67_Mk248_Mod_1_Mag: 20Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x67_Ball_Mk248_Mod_1"; + displayName = "$STR_ACE_20Rnd_762x67_Mk248_Mod_1_Mag_Name"; + displayNameShort = "$STR_ACE_20Rnd_762x67_Mk248_Mod_1_Mag_NameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x67_Mk248_Mod_1_Mag_Description"; + initSpeed = 880; + }; + class ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag: 20Rnd_762x51_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x67_Ball_Berger_Hybrid_OTM"; + displayName = "$STR_ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag_Name"; + displayNameShort = "$STR_ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort"; + descriptionShort = "$STR_ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag_Description"; + initSpeed = 832; + }; + class ACE_30Rnd_65x47_Scenar_mag: 30Rnd_65x39_caseless_mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_65x47_Ball_Scenar"; + displayName = "$STR_ACE_30Rnd_65x47_Scenar_mag_Name"; + displayNameShort = "$STR_ACE_30Rnd_65x47_Scenar_mag_NameShort"; + descriptionShort = "$STR_ACE_30Rnd_65x47_Scenar_mag_Description"; + }; + class 10Rnd_338_Mag; + class ACE_10Rnd_338_300gr_HPBT_Mag: 10Rnd_338_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_338_Ball"; + displayName = "$STR_ACE_10Rnd_338_300gr_HPBT_Mag_Name"; + displayNameShort = "$STR_ACE_10Rnd_338_300gr_HPBT_Mag_NameShort"; + descriptionShort = "$STR_ACE_10Rnd_338_300gr_HPBT_Mag_Description"; + initSpeed = 800; + }; + + 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 ACE_10Rnd_762x54_Tracer_mag: 16Rnd_9x21_Mag { + author = "$STR_ACE_Common_ACETeam"; + ammo = "ACE_762x54_Ball_7T2"; + displayName = "$STR_ACE_10Rnd_762x54_Tracer_mag_Name"; + displayNameShort = "$STR_ACE_10Rnd_762x54_Tracer_mag_NameShort"; + descriptionShort = "$STR_ACE_10Rnd_762x54_Tracer_mag_Description"; + 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/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index efd2132d959..7c32774f9f3 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -9,4 +9,156 @@ class CfgVehicles { //hitPart = "systemChat str _this"; }; }; + + class NATO_Box_Base; + class Box_NATO_Wps_F: NATO_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + }; + }; + + class Box_NATO_WpsSpecial_F: NATO_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_100Rnd_65x39_caseless_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_200Rnd_65x39_cased_Box_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); + }; + }; + + class Box_NATO_Ammo_F: NATO_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4); + }; + }; + + class Box_NATO_Support_F: NATO_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,6); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,3); + }; + }; + + class ReammoBox_F; + class B_supplyCrate_F: ReammoBox_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4); + }; + }; + + class EAST_Box_Base; + class Box_East_Wps_F: EAST_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); + }; + }; + + class Box_East_WpsSpecial_F: EAST_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); + }; + }; + + class Box_East_Ammo_F: EAST_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); + }; + }; + + class Box_East_Support_F: EAST_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,6); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,3); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); + }; + }; + + class IND_Box_Base; + class Box_IND_Wps_F: IND_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class Box_IND_WpsSpecial_F: IND_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,4); + }; + }; + + class Box_IND_Ammo_F: IND_Box_Base { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class FIA_Box_Base_F; + class Box_FIA_Wps_F: FIA_Box_Base_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class Box_FIA_Ammo_F: FIA_Box_Base_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class I_supplyCrate_F: B_supplyCrate_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class IG_supplyCrate_F: ReammoBox_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + }; + }; + + class C_supplyCrate_F: ReammoBox_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + }; + }; + + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x67_Mk248_Mod_0_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x67_Mk248_Mod_1_Mag,4); + MACRO_ADDMAGAZINE(ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk262_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Mk318_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_100Rnd_65x39_caseless_mag_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_200Rnd_65x39_cased_Box_Tracer_Dim,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + }; + }; }; diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index 2319f8279be..d5b6ad448ff 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -3,11 +3,49 @@ class Mode_SemiAuto; class Mode_FullAuto; class CfgWeapons { + 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 Rifle_Base_F; + 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,25 @@ class CfgWeapons { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; - class arifle_MX_SW_F: arifle_MX_Base_F { + magazines[] = { + "100Rnd_65x39_caseless_mag_Tracer", + "100Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + "ACE_100Rnd_65x39_caseless_mag_Tracer_Dim", + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" + }; + 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 +83,16 @@ class CfgWeapons { dispersion = 0.00147; // radians. Equal to 5.1 MOA. }; }; - class arifle_MXM_F: arifle_MX_Base_F { + magazines[] = { + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim", + "ACE_30Rnd_65x47_Scenar_mag" + }; + 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 +105,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 +124,20 @@ class CfgWeapons { /* Other */ - - class Rifle_Long_Base_F: Rifle_Base_F {}; class LMG_Mk200_F: Rifle_Long_Base_F { + magazines[] = { + "200Rnd_65x39_cased_Box", + "200Rnd_65x39_cased_Box_Tracer", + "ACE_200Rnd_65x39_cased_Box_Tracer_Dim" + }; + 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 +146,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 +166,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 +198,8 @@ class CfgWeapons { /* SMGs */ - class SDAR_base_F: Rifle_Base_F { + initSpeed = -0.989; 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 +209,687 @@ 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 { + magazines[] = { + "30Rnd_65x39_caseless_green", + "30Rnd_65x39_caseless_green_mag_Tracer", + "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" + }; + initSpeed = -1.08; + ACE_barrelTwist=8; + ACE_barrelLength=28.7; + }; + class arifle_Katiba_C_F: arifle_katiba_Base_F { + magazines[] = { + "30Rnd_65x39_caseless_green", + "30Rnd_65x39_caseless_green_mag_Tracer", + "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" + }; + initSpeed = -1.07; + ACE_barrelTwist=8; + ACE_barrelLength=26.8; + }; + class arifle_Katiba_GL_F: arifle_katiba_Base_F { + magazines[] = { + "30Rnd_65x39_caseless_green", + "30Rnd_65x39_caseless_green_mag_Tracer", + "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" + }; + initSpeed = -1.08; + ACE_barrelTwist=8; + ACE_barrelLength=28.7; + }; + class arifle_MX_F: arifle_MX_Base_F { + magazines[] = { + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" + }; + initSpeed = -0.99; + ACE_barrelTwist=9; + ACE_barrelLength=14.5; + }; + class arifle_MX_GL_F: arifle_MX_Base_F { + magazines[] = { + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" + }; + 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 { + magazines[] = { + "30Rnd_65x39_caseless_mag", + "30Rnd_65x39_caseless_mag_Tracer", + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" + }; + 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 { + magazines[] = { + "20Rnd_556x45_UW_mag", + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + initSpeed = -0.989; + 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 { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + initSpeed = -0.95; + ACE_barrelTwist=7; + ACE_barrelLength=15; + }; + class arifle_TRG21_F: Tavor_base_F { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + initSpeed = -0.989; + ACE_barrelTwist=7; + ACE_barrelLength=18.1; + }; + class arifle_TRG21_GL_F: Tavor_base_F { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + 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 { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + initSpeed = -0.98; + ACE_barrelTwist=7; + ACE_barrelLength=17.4; + }; + class arifle_Mk20C_F: mk20_base_F { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + initSpeed = -0.956; + ACE_barrelTwist=7; + ACE_barrelLength=16; + }; + class arifle_Mk20_GL_F: mk20_base_F { + magazines[] = { + "30Rnd_556x45_Stanag", + "30Rnd_556x45_Stanag_Tracer_Red", + "30Rnd_556x45_Stanag_Tracer_Green", + "30Rnd_556x45_Stanag_Tracer_Yellow", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + 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 { + magazines[] = { + "10Rnd_762x54_Mag", + "ACE_10Rnd_762x54_Tracer_mag" + }; + initSpeed = -1.025; + ACE_barrelTwist=9.5; + ACE_barrelLength=24; + }; + class srifle_EBR_F: EBR_base_F { + magazines[] = { + "20Rnd_762x51_Mag", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mag_SD" + }; + 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 { + magazines[] = { + "10Rnd_338_Mag", + "ACE_10Rnd_338_300gr_HPBT_Mag", + "ACE_20Rnd_762x67_Mk248_Mod_0_Mag", + "ACE_20Rnd_762x67_Mk248_Mod_1_Mag", + "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag" + }; + initSpeed = -0.962; + ACE_barrelTwist=10; + ACE_barrelLength=20; + }; + class srifle_DMR_03_F: DMR_03_base_F { + magazines[] = { + "20Rnd_762x51_Mag", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mag_SD" + }; + 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 { + magazines[] = { + "20Rnd_762x51_Mag", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mag_SD" + }; + 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 4b9944364c7..8ea75e4460f 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/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml new file mode 100644 index 00000000000..41070fa3dd7 --- /dev/null +++ b/addons/ballistics/stringtable.xml @@ -0,0 +1,768 @@ + + + + + + + 6.5mm 30Rnd Tracer IR-DIM Mag + 6,5 mm Nyomjelző IR-DIM 30-as Tár + 6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 6,5mm + Ch. 6,5mm 30Cps Traçantes IR-DIM + Magazynek 6,5mm 30rd Smugacz IR-DIM + 6.5mm 30ks Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 6,5mm + Caricatore 6.5mm 30Rnd Traccianti IR-DIM + Магазин из 30-ти 6.5 мм трассирующих под ПНВ + + + 6.5mm IR-DIM + 6,5 mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6.5mm IR-DIM + 6,5mm IR-DIM + 6.5 IR-DIM + 6.5 мм ИК-трассирующие + + + Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm Svítící IR-DIM<br />Munice: 30<br />Použití: MX/C/M/SW/3GL + Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm Traccianti IR-DIM <br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Калибр: 6.5x39 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL + + + 6.5mm 30Rnd SD Mag + 6,5 mm Halk 30-as Tár + 6,5 mm 30-Schuss-Magazin SD + Cargador de 30 balas SD de 6,5mm + Ch. 6,5mm 30Cps SD + Magazynek 6,5mm 30rd SD + 6.5mm 30ks SD Zásobník + Carregador de 30 projéteis SD de 6,5mm + Caricatore 6.5mm 30Rnd Sil. + Магазин из 30-ти 6.5 мм дозвуковых + + + 6.5mm SD + 6,5 mm Halk + 6,5mm SD + 6,5mm SD + 6,5mm SD + 6,5mm SD + 6.5mm SD + 6,5mm SD + 6.5mm Sil. + 6.5 мм дозвуковые + + + Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Halk<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm SD<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm SD<br />Munice: 30<br />Použití: MX/C/M/SW/3GL + Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Калибр: 6.5x39 мм дозвуковые<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL + + + 6.5mm 30Rnd AP Mag + 6,5 mm Páncéltörő 30-as Tár + 6,5 mm 30-Schuss-Magazin AP + Cargador de 30 balas AP de 6,5mm + Ch. 6,5mm 30Cps AP + Magazynek 6,5mm 30rd AP + 6.5mm 30ks AP Zásobník + Carregador de 30 projéteis AP de 6,5mm + Caricatore 6.5mm 30Rnd AP + Магазин из 30-ти 6.5 мм бронебойных + + + 6.5mm AP + 6,5 mm Páncéltörő + 6,5mm AP + 6,5mm AP + 6,5mm AP + 6,5mm AP + 6.5mm AP + 6,5mm AP + 6.5mm AP + 6.5 мм бронебойные + + + Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Páncéltörő<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm AP<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm AP<br />Munice: 30<br />Použití: MX/C/M/SW/3GL + Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Калибр: 6.5x39 мм бронебойные<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL + + + + 6.5mm 30Rnd Tracer IR-DIM Mag + 6,5mm IR-DIM Nyomjelző 30-as Tár + 6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 6,5mm + Ch. 6,5mm 30Cps Traçantes IR-DIM + Magazynek 6,5mm 30rd Smugacz IR-DIM + 6.5mm 30ks Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 6,5mm + Caricatore 6.5mm 30Rnd Traccianti IR-DIM + Магазин из 30-ти 6.5 мм трассирующих под ПНВ + + + 6.5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6,5mm IR-DIM + 6.5mm IR-DIM + 6,5mm IR-DIM + 6.5mm IR-DIM + 6.5 мм ИК-трассирующие + + + Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: Katiba + Kaliber: 6,5x39 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm Svítící IR-DIM<br />Munice: 30<br />Použití: Katiba + Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba + Калибр: 6.5x39 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: Katiba + + + 6.5mm 30Rnd SD Mag + 6,5 mm Halk 30-as Tár + 6,5 mm 30-Schuss-Magazin SD + Cargador de 30 balas SD de 6,5mm + Ch. 6,5mm 30Cps SD + Magazynek 6,5mm 30rd SD + 6.5mm 30ks SD Zásobník + Carregador de 30 projéteis SD de 6,5mm + Caricatore 6.5mm 30Rnd Sil. + Магазин из 30-ти 6.5 мм дозвуковых + + + 6.5mm SD + 6,5 mm Halk + 6,5mm SD + 6,5mm SD + 6,5mm SD + 6,5mm SD + 6.5mm SD + 6,5mm SD + 6.5mm Sil. + 6.5 мм дозвуковые + + + Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Halk<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé dans: Katiba + Kaliber: 6,5x39 mm SD<br />Naboje: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm SD<br />Munice: 30<br />Použití: Katiba + Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: Katiba + Калибр: 6.5x39 мм дозвуковые<br />Патронов: 30<br />Применимы в: Katiba + + + 6.5mm 30Rnd AP Mag + 6,5 mm Páncéltörő 30-as Tár + 6,5 mm 30-Schuss-Magazin AP + Cargador de 30 balas AP de 6,5mm + Ch. 6,5mm 30Cps AP + Magazynek 6,5mm 30rd AP + 6.5mm 30ks AP Zásobník + Carregador de 30 projéteis AP de 6,5mm + Caricatore 6.5mm 30Rnd AP + Магазин из 30-ти 6.5 мм бронебойных + + + 6.5mm AP + 6,5 mm Páncéltörő + 6,5mm AP + 6,5mm AP + 6,5mm AP + 6,5mm AP + 6.5mm AP + 6,5mm AP + 6.5mm AP + 6.5 мм бронебойные + + + Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Páncéltörő<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé dans: Katiba + Kaliber: 6,5x39 mm AP<br />Pociski: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm AP<br />Munice: 30<br />Použití: Katiba + Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: Katiba + Калибр: 6.5x39 мм бронебойные<br />Патронов: 30<br />Применимы в: Katiba + + + + 5.56mm 30rnd Tracer IR-DIM Mag + 5,56 mm Nyomjelző IR-DIM 30-as Tár + 5,56 mm 30-Schuss-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 5,56mm + Ch. 5,56mm 30Cps Traçantes IR-DIM + Magazynek 5,56mm 30rd Smugacz IR-DIM + 5.56mm 30ks Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 5,56mm + Caricatore 5.56mm 30rnd Traccianti IR-DIM + Магазин из 30-ти 5.56 мм трассирующих под ПНВ + + + 5.56mm IR-DIM + 5,56 mm IR-DIM + 5,56mm IR-DIM + 5,56mm IR-DIM + 5,56mm IR-DIM + 5,56mm IR-DIM + 5.56mm IR-DIM + 5,56mm IR-DIM + 5.56mm IR-DIM + 5.56 мм ИК-трассирующие + + + Caliber: 5.56x45 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Ráže: 5.56x45 mm Svítící IR-DIM<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibro: 5.56x45 mm Traccianti IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Калибр: 5.56x45 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + + + 5.56mm 30Rnd AP Mag + 5,56 mm Páncéltörő 30-as Tár + 5,56 mm 30-Schuss-Magazin AP + Cargador de 30 balas AP de 5,56mm + Ch. 5,56mm 30Cps AP + Magazynek 5,56mm 30rd AP + 5.56mm 30ks AP Zásobník + Carregador de 30 projéteis AP de 5,56mm + Caricatore 5.56mm 30Rnd AP + Магазин из 30-ти 5.56 мм бронебойных + + + 5.56mm AP + 5,56 mm Páncéltörő + 5,56mm AP + 5,56mm AP + 5,56mm AP + 5,56mm AP + 5.56mm AP + 5,56mm AP + 5.56mm AP + 5.56 мм бронебойные + + + Caliber: 5.56x45 mm AP<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Páncéltörő<br />Lövedékek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm AP<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm AP<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm AP<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm AP<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Ráže: 5.56x45 mm AP<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm AP<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibro: 5.56x45 mm AP<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Калибр: 5.56x45 мм бронебойные<br />Патронов: 30<br />Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + + + + 7.62mm 20rnd Tracer Mag + 7,62 mm Nyomjelző IR-DIM 20-as Tár + 7,62 mm 20-Schuss-Magazin Leuchtspur + Cargador de 20 balas trazadores de 7,62mm + Ch. 7,62mm 20Cps Traçantes + Magazynek 7,62mm 20rd Smugacz + 7.62mm 20ks Svítící Zásobník + Carregador de 20 projéteis traçantes de 7,62mm + Caricatore 7.62mm 20Rnd Traccianti + Магазин из 20-ти 7.62 мм трассирующих + + + 7.62mm Tracer + 7,62 mm Nyomjelző + 7,62mm Leuchtspur + 7,62mm Trazadora + 7,62mm Traçantes + 7,62mm Smugacz + 7.62mm Svítící + 7,62mm Traçante + 7.62mm Traccianti + 7.62 мм трассирущие + + + Caliber: 7.62x51 mm Tracer<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadora<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçantes<br />Cartouches: 20<br />Utilisé dans: EBR + Kaliber: 7,62x51 mm Smugacz<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící<br />Munice: 20<br />Použití: Mk18 ABR + Calibre: 7,62x51 mm Traçante<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti<br />Munizioni: 20<br />In uso su: Mk18 ABR + Калибр: 7.62x51 мм трассирующие<br />Патронов: 20<br />Применимы в: Mk18 ABR + + + 7.62mm 20rnd Tracer IR-DIM Mag + 7,62 mm Nyomjelző IR-DIM 20-as Tár + 7,62 mm 20-Schuss-Magazin Leuchtspur IR-DIM + Cargador de 20 balas IR-DIM de 7,62mm + Ch. 7,62mm 20Cps Traçantes IR-DIM + Magazynek 7,62mm 20rd Smugacz IR-DIM + 7.62mm 20ks Svítící IR-DIM Zásobník + Carregador de 20 projéteis IR-DIM de 7,62mm + Caricatore 7.62mm 20rnd Traccianti IR-DIM + Магазин из 20-ти 7.62 мм трассирующих под ПНВ + + + 7.62mm IR-DIM + 7,62 mm IR-DIM + 7,62mm IR-DIM + 7,62mm IR-DIM + 7,62mm IR-DIM + 7,62mm IR-DIM + 7.62mm IR-DIM + 7,62mm IR-DIM + 7.62mm IR-DIM + 7.62 мм ИК-трассирующие + + + Caliber: 7.62x51 mm Tracer IR-DIM<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző IR-DIM<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur IR-DIM<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadoras IR-DIM<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçantes IR-DIM<br />Cartouches: 20<br />Utilisé dans: EBR + Kaliber: 7,62x51 mm Smugacz IR-DIM<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící IR-DIM<br />Munice: 20<br />Použití: Mk18 ABR + Calibre: 7,62x51 mm Traçante IR-DIM<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti IR-DIM<br />Munizioni: 20<br />In uso su: Mk18 ABR + Калибр: 7.62x51 мм трассирующие под ПНВ<br />Патронов: 20<br />Применимы в: Mk18 ABR + + + 7.62mm 20Rnd SD Mag + 7,62 mm Halk 20-as Tár + 7,62 mm 20-Schuss-Magazin SD + Cargador de 20 balas SD de 7,62mm + Ch. 7,62mm 20Cps SD + Magazynek 7,62mm 20rd SD + 7.62mm 20ks SD Zásobník + Carregador de 20 projéteis SD de 7,62mm + Caricatore 7.62mm 20Rnd Sil. + Магазин из 20-ти 7.62 мм дозвуковых + + + 7.62mm SD + 7,62 mm Halk + 7,62mm SD + 7,62mm SD + 7,62mm SD + 7,62mm SD + 7.62mm SD + 7,62mm SD + 7.62mm Sil. + 7.62 мм дозвуковые + + + Caliber: 7.62x51 mm SD<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Halk<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm SD<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm SD<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm SD<br />Cartouches: 20<br />Utilisé dans: EBR + Kaliber: 7,62x51 mm SD<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm SD<br />Munice: 20<br />Použití: Mk18 ABR + Calibre: 7,62x51 mm SD<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR + Калибр: 7.62x51 мм дозвуковые<br />Патронов: 20<br />Применимы в: Mk18 ABR + + + 7.62mm 20Rnd AP Mag + 7,62 mm Páncéltörő 20-as Tár + 7,62 mm 20-Schuss-Magazin AP + Cargador de 20 balas AP de 7,62mm + Ch. 7,62mm 20Cps AP + Magazynek 7,62mm 20rd AP + 7.62mm 20ks AP Zásobník + Carregador de 20 projéteis AP de 7,62mm + Caricatore 7.62mm 20Rnd AP + Магазин из 20-ти 7.62 мм бронебойных + + + 7.62mm AP + 7,62 mm Páncéltörő + 7,62mm AP + 7,62mm AP + 7,62mm AP + 7,62mm AP + 7.62mm AP + 7,62mm AP + 7.62mm AP + 7.62 мм бронебойные + + + Caliber: 7.62x51 mm AP<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Páncéltörő<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm AP<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm AP<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm AP<br />Cartouches: 20<br />Utilisé dans: EBR + Kaliber: 7,62x51 mm AP<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm AP<br />Munice: 20<br />Použití: Mk18 ABR + Calibre: 7,62x51 mm AP<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm AP<br />Munizioni: 20<br />In uso su: Mk18 ABR + Калибр: 7.62x51 мм дозвуковые<br />Патронов: 20<br />Применимы в: Mk18 ABR + + + + .338 LM 10Rnd AP Mag + .338 LM 10-Schuss-Magazin Hartkern + Magazynek .338 LM 10rd AP + + + .338 LM AP + .338 LM AP + .338 LM AP + .338 LM AP + + + Caliber: .338 Lapua Magnum AP<br />Rounds: 10<br />Used in: MAR-10 + Kaliber: .338 Lapua Magnum Hartkern<br />Schuss: 10<br />Verwendet für: MAR-10 + Kaliber: .338 Lapua Magnum AP<br />Pociski: 10<br />Używany w: MAR-10 + + + + .338 NM 130Rnd Tracer Belt + .338 NM 130-Schuss-Gurt Leuchtspur + Taśma .338 NM 130rd Smugacz + + + .338 NM Tracer + .338 NM Leuchtspur + .338 NM Tracer + .338 NM Svítící + + + Caliber: .338 Norma Magnum Tracer<br />Rounds: 130<br />Used in: SPMG + Kaliber: .338 Norma Magnum Leuchtspur<br />Schuss: 130<br />Verwendet für: SPMG + Kaliber: .338 Norma Magnum Smugacz<br />Pociski: 130<br />Używany w: SPMG + + + .338 NM 130Rnd IR-DIM Belt + .338 NM 130-Schuss-Gurt Leuchtspur IR-DIM + Taśma .338 NM 130rd IR-DIM + + + .338 NM IR-DIM + .338 LM IR-DIM + .338 NM IR-DIM + .338 NM IR-DIM + + + Caliber: .338 Norma Magnum Tracer IR-DIM<br />Rounds: 130<br />Used in: SPMG + Kaliber: .338 Norma Magnum Leuchtspur IR-DIM<br />Schuss: 130<br />Verwendet für: SPMG + Kaliber: .338 Norma Magnum Smugacz IR-DIM<br />Pociski: 130<br />Używany w: SPMG + + + .338 NM 130Rnd AP Belt + .338 NM 130-Schuss-Gurt Hartkern + Taśma .338 NM 130rd AP + + + .338 NM AP + .338 NM AP + .338 NM AP + .338 NM AP + + + Caliber: .338 Norma Magnum AP<br />Rounds: 130<br />Used in: SPMG + Kaliber: .338 Norma Magnum Hartkern<br />Schuss: 130<br />Verwendet für: SPMG + Kaliber: .338 Norma Magnum AP<br />Pociski: 130<br />Używane w: SPMG + + + + 9.3mm 10Rnd Tracer Mag + 9,3mm 10-Schuss-Magazin Leuchtspur + Magazynek 9.3mm 10rd Smugacz + + + 9.3mm Tracer + 9,3mm Leuchtspur + 9,3mm Smugacz + 9.3mm Svítící + + + Caliber: 9.3x64mm Tracer<br />Rounds: 10<br />Used in: Cyrus + Kaliber: 9,3x64mm Leuchtspur<br />Schuss: 10<br />Verwendet für: Cyrus + Kaliber: 9,3x64 mm Smugacz<br />Pociski: 10<br />Używany w: Cyrus + + + 9.3mm 10Rnd Tracer IR-DIM Mag + 9,3mm 10-Schuss-Magazin Leuchtspur IR-DIM + Magazynek 9,3mm 10rd Smugacz IR-DIM + + + 9.3mm IR-DIM + 9,3mm IR-DIM + 9,3mm IR-DIM + 9.3mm IR-DIM + + + Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 10<br />Used in: Cyrus + Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Schuss: 10<br />Verwendet für: Cyrus + Kaliber: 9,3x64 mm Smugacz IR-DIM<br />Pociski: 10<br />Używany w: Cyrus + + + 9.3mm 10Rnd AP Mag + 9,3mm 10-Schuss-Magazin Hartkern + Magazynek 9,3mm 10rd AP + + + 9.3mm AP + 9,3mm AP + 9,3mm AP + 9.3mm AP + + + Caliber: 9.3x64mm AP<br />Rounds: 10<br />Used in: Cyrus + Kaliber: 9,3x64mm Hartkern<br />Schuss: 10<br />Verwendet für: Cyrus + Kaliber: 9,3x64 mm AP<br />Pociski: 10<br />Używany w: Cyrus + + + + 9.3mm 150Rnd Tracer Belt + 9,3mm 150-Schuss-Gurt Leuchtspur + Taśma 9,3mm 150rd Smugacz + + + 9.3mm Tracer + 9,3mm Leuchtspur + 9,3mm Smugacz + 9.3mm Svítící + + + Caliber: 9.3x64mm Tracer<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64mm Leuchtspur<br />Schuss: 150<br />Verwendet für: Navid + Kaliber: 9,3x64 mm Smugacz<br />Pociski: 150<br />Używane w: Navid + + + 9.3mm 150Rnd Tracer IR-DIM Belt + 9,3mm 150-Schuss-Gurt Leuchtspur IR-DIM + Taśma 9,3mm 150rd Smugacz IR-DIM + + + 9.3mm IR-DIM + 9,3mm IR-DIM + 9,3mm IR-DIM + 9.3mm IR-DIM + + + Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Schuss: 150<br />Verwendet für: Navid + Kaliber: 9,3x64 mm Smugacz IR-DIM<br />Pociski: 150<br />Używane w: Navid + + + 9.3mm 150Rnd AP Belt + 9,3mm 150-Schuss-Gurt Hartkern + Taśma 9,3mm 150rd AP + + + 9.3mm AP + 9,3mm AP + 9,3mm AP + 9.3mm AP + + + Caliber: 9.3x64mm AP<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64mm Hartkern<br />Schuss: 150<br />Verwendet für: Navid + Kaliber: 9,3x64 mm AP<br />Pociski: 150<br />Używane w: Navid + + + 9x19mm 16Rnd Mag + Magazynek 9x19mm 16rd + + + 9x19mm + 9x19mm + + + 9x19mm 16Rnd Mag + Magazynek 9x19mm 16rd + + + 9x19mm 30Rnd Mag + Magazynek 9x19mm 30rd + + + 9x19mm + 9x19mm + + + 9x19mm 30Rnd Mag + Magazynek 9x19mm 30rd + + + 7.62x54mm 10Rnd Tracer IR-DIM Mag + Magazynek 7,62x54 mm 10rd Smugacz IR-DIM + + + 7.62mm IR-DIM + 7,62mm IR-DIM + + + 7.62x54mm 10Rnd Tracer IR-DIM Mag + Magazynek 7,62x54 mm 10rd Smugacz IR-DIM + + + 6.5mm 100Rnd Tracer IR-DIM Mag + Magazynek 6,5mm 100rd Smugacz IR-DIM + + + 6.5mm IR-DIM + 6,5mm IR-DIM + + + 6.5mm 100Rnd Tracer IR-DIM Mag + Magazynek 6,5mm 100rd Smugacz IR-DIM + + + 6.5mm 200Rnd Tracer IR-DIM Belt + Magazynek 6,5mm 200rd Smugacz IR-DIM + + + 6.5mm IR-DIM + 6,5mm IR-DIM + + + 6.5mm 200Rnd Tracer IR-DIM Belt + Magazynek 6,5mm 200rd Smugacz IR-DIM + + + 5.56mm 30Rnd Mag (Mk262) + Magazynek 5,56mm 30rd Mk262 + + + 5.56mm (Mk262) + 5,56mm (Mk262) + + + Caliber: 5.56x45 mm NATO (Mk262)<br />Rounds: 30 + Kaliber: 5,56x45 mm NATO (Mk262)<br />Pociski: 30 + + + 5.56mm 30Rnd Mag (Mk318) + Magazynek 5,56mm 30rd Mk318 + + + 5.56mm (Mk318) + 5,56mm (Mk318) + + + Caliber: 5.56x45 mm NATO (Mk318)<br />Rounds: 30 + Kaliber: 5,56x45 mm NATO (Mk318)<br />Pociski: 30 + + + 7.62mm 10Rnd Mag (M118LR) + Magazynek 7,62mm 10rd (M118LR) + + + 7.62mm (M118LR) + 7,62mm (M118LR) + + + Caliber: 7.62x51 mm NATO (M118LR)<br />Rounds: 10 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Pociski: 10 + + + 7.62mm 20Rnd Mag (M118LR) + Magazynek 7,62mm 20rd (M118LR) + + + 7.62mm (M118LR) + 7,62mm (M118LR) + + + Caliber: 7.62x51 mm NATO (M118LR)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Pociski: 20 + + + 7.62mm 20Rnd Mag (Mk248 Mod 0) + Magazynek 7,62mm 20rd (Mk248 Mod 0) + + + 7.62mm (Mk248 Mod 0) + 7,62mm (Mk248 Mod 0) + + + Caliber: 7.62x67 mm NATO (Mk248 Mod 0)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (Mk248 Mod 0)<br />Pociski: 20 + + + 7.62mm 20Rnd Mag (Mk248 Mod 1) + Magazynek 7,62mm 20rd (Mk248 Mod 1) + + + 7.62mm (Mk248 Mod 1) + 7,62mm (Mk248 Mod 1) + + + Caliber: 7.62x67 mm NATO (Mk248 Mod 1)<br />Rounds: 20 + Kaliber: 7,62x67 mm NATO (Mk248 Mod 1)<br />Pociski: 20 + + + 7.62mm 20Rnd Mag (Berger Hybrid OTM) + Magazynek 7,62mm 20rd (Berger Hybrid OTM) + + + 7.62mm (OTM) + 7,62mm (OTM) + + + Caliber: 7.62x67 mm NATO (Berger Hybrid OTM)<br />Rounds: 20 + Kaliber: 7,62x67 mm NATO (Berger Hybrid OTM)<br />Pociski: 20 + + + 6.5x47mm 30Rnd Mag (HPBT Scenar) + + + 6.5mm Scenar + + + Caliber: 6.5x47mm (HPBT Scenar)<br />Rounds: 30 + + + 8.6x70mm 10Rnd Mag (300gr Sierra MatchKing HPBT) + + + .338 (HPBT) + + + Caliber: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Rounds: 10 + + + diff --git a/addons/captives/functions/fnc_canSurrender.sqf b/addons/captives/functions/fnc_canSurrender.sqf index 3ee687cfc19..3b810a0c5cc 100644 --- a/addons/captives/functions/fnc_canSurrender.sqf +++ b/addons/captives/functions/fnc_canSurrender.sqf @@ -18,6 +18,8 @@ PARAMS_2(_unit,_newSurrenderState); +if (currentWeapon _unit != "") exitWith {false}; + private "_returnValue"; _returnValue = if (_newSurrenderState) then { diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 5917532874e..e9923391861 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -54,7 +54,7 @@ if (_state) then { PARAMS_2(_unit,_newAnimation); if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { ERROR("Handcuff animation interrupted"); - systemChat format ["debug %2: new %1", _newAnimation, time]; + // systemChat format ["debug %2: new %1", _newAnimation, time]; [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); }; }]; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 73451863ddc..30f91055117 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -52,7 +52,7 @@ if (_state) then { PARAMS_2(_unit,_newAnimation); if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { ERROR("Surrender animation interrupted"); - systemChat format ["debug %2: new %1", _newAnimation, time]; + // systemChat format ["debug %2: new %1", _newAnimation, time]; [_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation); }; }]; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index bc9cff1572d..5a6e9f7b0e7 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,164 +1,183 @@  - - - - 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 - Kapitulieren - Rendirse - Сдаться - - - Stop Surrendering - Den Kampf erneut aufnehmen - Dejar de rendirse - Остановить сдачу - - - Only use on alive units - Nur bei lebenden Einheiten verwendbar - Utilizar solo en unidades vivas - Только для живых юнитов - - - Only use on dismounted inf - Nur bei abgesessener Infanterie verwendbar - Utilizar solo en infanteria desmontada - Только для спеш. солдат - - - Nothing under mouse - Es wurde nichts ausgewählt - Nada bajo el ratón - Объекты под мышью отсутствуют - - - \ No newline at end of file + + + 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 engedé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 őt! + Вы должны сначала взять его в плен! + + + 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 foglyulejtéséhez használható. + Кабельные стяжки позволяют связывать пленников. + + + 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ę + Сдаться в плен + Megadás + + + Stop Surrendering + Annuler la capitulation + Den Kampf erneut aufnehmen + Dejar de rendirse + Přestat se vzdávat + Podejmij walkę ponownie + Отменить сдачу в плен + Megadás abbahagyása + + + 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 + Применимо только к живым юнитам + Csak élő egységeken használni + + + 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 + Применимо только к пехоте вне техники + Csak járműben kívül lévő egységeken használni + + + 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 + Ничего не выделено + Semmi sincs az egér alatt + + + diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index eef90451ae3..ce0938f0632 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -26,6 +26,9 @@ class Extended_InitPost_EventHandlers { class GVAR(forceWalk) { init = QUOTE(if (local (_this select 0)) then {_this call FUNC(applyForceWalkStatus);};); }; + class GVAR(muteUnit) { + init = QUOTE(_this call FUNC(muteUnitHandleInitPost)); + }; }; }; @@ -41,4 +44,9 @@ class Extended_Respawn_EventHandlers { respawn = QUOTE(_this call FUNC(resetAllDefaults)); }; }; + class CAManBase { + class GVAR(muteUnit) { + respawn = QUOTE(_this call FUNC(muteUnitHandleRespawn)); + }; + }; }; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index f09dae0eb3b..e470e91c95a 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -35,6 +35,7 @@ if (hasInterface) then { ["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler); ["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler); +["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler); // hack to get PFH to work in briefing [QGVAR(onBriefingPFH), "onEachFrame", { diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 8d62e9df704..b5382d0b5ed 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -124,6 +124,8 @@ PREP(moduleCheckPBOs); PREP(moduleLSDVehicles); PREP(moveToTempGroup); PREP(muteUnit); +PREP(muteUnitHandleInitPost); +PREP(muteUnitHandleRespawn); PREP(numberToDigits); PREP(numberToDigitsString); PREP(numberToString); diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 90309af612c..769ba37de10 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -69,9 +69,9 @@ class ACE_Settings { * force = 0; * * Does it appear on the options menu? - * isClientSetable = 1; + * isClientSettable = 1; * - * The following settings only apply when isClientSetable == 1 + * The following settings only apply when isClientSettable == 1 * Stringtable entry with the setting name * displayName = "$STR_ACE_Common_SettingName"; * @@ -90,14 +90,14 @@ class ACE_Settings { /*class GVAR(enableNumberHotkeys) { value = 1; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Common_EnableNumberHotkeys"; };*/ class GVAR(settingFeedbackIcons) { value = 1; typeName = "SCALAR"; force = 0; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Common_SettingFeedbackIconsName"; description = "$STR_ACE_Common_SettingFeedbackIconsDesc"; values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"}; @@ -106,7 +106,7 @@ class ACE_Settings { value = 0; typeName = "SCALAR"; force = 0; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Common_SettingProgressbarLocationName"; description = "$STR_ACE_Common_SettingProgressbarLocationDesc"; values[] = {"Top", "Bottom"}; @@ -114,14 +114,14 @@ class ACE_Settings { class GVAR(displayTextColor) { value[] = {0,0,0,0.1}; typeName = "COLOR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Common_SettingDisplayTextColorName"; description = "$STR_ACE_Common_SettingDisplayTextColorDesc"; }; class GVAR(displayTextFontColor) { value[] = {1,1,1,1}; typeName = "COLOR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Common_SettingDisplayTextFontColorName"; description = "$STR_ACE_Common_SettingDisplayTextFontColorDesc"; }; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index b28d864df85..339055487b1 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -4,9 +4,10 @@ * or places it in a weaponHolder if no space. * * Arguments: - * 0: Unit (OBJECT) - * 1: Classname (String) - * 2: Container (String, Optional) uniform, vest, backpack + * 0: Unit + * 1: Classname + * 2: Container (uniform, vest, backpack) + * 3: Magazine Ammo Count * * Return Value: * Array: @@ -19,37 +20,29 @@ #include "script_component.hpp" EXPLODE_2_PVT(_this,_unit,_classname); +DEFAULT_PARAM(2,_container,""); +DEFAULT_PARAM(3,_ammoCount,-1); + private "_addedToPlayer"; -private "_container"; private "_canAdd"; private "_type"; _canAdd = false; _addedToPlayer = true; -if((count _this) > 2) then { - _container = _this select 2; -} else { - _container = nil; -}; - _type = [_classname] call EFUNC(common,getItemType); -if(!isNil "_container") then { - switch (_container) do { - case "vest": { _canAdd = _unit canAddItemToVest _classname; }; - case "backpack": { _canAdd = _unit canAddItemToBackpack _classname; }; - case "uniform": { _canAdd = _unit canAddItemToUniform _classname; }; - }; -} else { - _container = ""; - _canAdd = _unit canAdd _classname; +switch (_container) do { + case "vest": { _canAdd = _unit canAddItemToVest _classname; }; + case "backpack": { _canAdd = _unit canAddItemToBackpack _classname; }; + case "uniform": { _canAdd = _unit canAddItemToUniform _classname; }; + default {_canAdd = _unit canAdd _classname;}; }; switch ((_type select 0)) do { case "weapon": { if (_canAdd) then { - switch (_container) do { + switch (_container) do { case "vest": { (vestContainer _unit) addWeaponCargoGlobal [_classname, 1]; }; case "backpack": { (backpackContainer _unit) addWeaponCargoGlobal [_classname, 1]; }; case "uniform": { (uniformContainer _unit) addWeaponCargoGlobal [_classname, 1]; }; @@ -64,24 +57,25 @@ switch ((_type select 0)) do { }; }; case "magazine": { + if (_ammoCount == -1) then {_ammoCount = getNumber (configFile >> "CfgMagazines" >> _classname >> "count");}; if (_canAdd) then { switch (_container) do { - case "vest": { (vestContainer _unit) addMagazineCargoGlobal [_classname, 1]; }; - case "backpack": { (backpackContainer _unit) addMagazineCargoGlobal [_classname, 1]; }; - case "uniform": { (uniformContainer _unit) addMagazineCargoGlobal [_classname, 1]; }; - default { _unit addMagazineGlobal _classname; }; + case "vest": { (vestContainer _unit) addMagazineCargoGlobal [_classname, _ammoCount]; }; + case "backpack": { (backpackContainer _unit) addMagazineCargoGlobal [_classname, _ammoCount]; }; + case "uniform": { (uniformContainer _unit) addMagazineCargoGlobal [_classname, _ammoCount]; }; + default {_unit addMagazine [_classname, _ammoCount]; }; }; } else { _addedToPlayer = false; _pos = _unit modelToWorldVisual [0,1,0.05]; _unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"]; - _unit addMagazineCargoGlobal [_classname, 1]; + _unit addMagazineCargoGlobal [_classname, _ammoCount]; _unit setPosATL _pos; }; }; case "item": { if (_canAdd) then { - switch (_container) do { + switch (_container) do { case "vest": { _unit addItemToVest _classname; }; case "backpack": { _unit addItemToBackpack _classname; }; case "uniform": { _unit addItemToUniform _classname; }; diff --git a/addons/common/functions/fnc_muteUnit.sqf b/addons/common/functions/fnc_muteUnit.sqf index 8edf9df3911..5c496ea58e4 100644 --- a/addons/common/functions/fnc_muteUnit.sqf +++ b/addons/common/functions/fnc_muteUnit.sqf @@ -5,21 +5,34 @@ * * Argument: * 0: Unit (Object) + * 1: Reason to mute the unit (String) * * Return value: * Nothing */ #include "script_component.hpp" -private ["_unit", "_speaker"]; +private ["_unit", "_reason"]; _unit = _this select 0; +_reason = _this select 1; if (isNull _unit) exitWith {}; +// add reason to mute to the unit +private "_muteUnitReasons"; +_muteUnitReasons = _unit getVariable [QGVAR(muteUnitReasons), []]; + +if !(_reason in _muteUnitReasons) then { + _muteUnitReasons pushBack _reason; + _unit setVariable [QGVAR(muteUnitReasons), _muteUnitReasons, true]; +}; + +private "_speaker"; _speaker = speaker _unit; + if (_speaker == "ACE_NoVoice") exitWith {}; -[0, "{(_this select 1) setSpeaker 'ACE_NoVoice'}", _unit, "ACE_Speaker"] call FUNC(execPersistentFnc); +["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(globalEvent); _unit setVariable ["ACE_OriginalSpeaker", _speaker, true]; diff --git a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf new file mode 100644 index 00000000000..f0abcfcf018 --- /dev/null +++ b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf @@ -0,0 +1,11 @@ +// by commy2 +#include "script_component.hpp" + +private "_unit"; + +_unit = _this select 0; + +// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again +if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then { + ["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent); +}; diff --git a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf new file mode 100644 index 00000000000..021b083bfd5 --- /dev/null +++ b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf @@ -0,0 +1,12 @@ +// by commy2 +#include "script_component.hpp" + +private "_unit"; + +_unit = _this select 0; + +// setVariable is broken on JIP after respawn +_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true]; + +// fix mp issues with respawning and the speaker +["setSpeaker", [_unit, speaker _unit]] call FUNC(globalEvent); diff --git a/addons/common/functions/fnc_restoreVariablesJIP.sqf b/addons/common/functions/fnc_restoreVariablesJIP.sqf index 2c173a054cd..ca185082cbc 100644 --- a/addons/common/functions/fnc_restoreVariablesJIP.sqf +++ b/addons/common/functions/fnc_restoreVariablesJIP.sqf @@ -23,6 +23,3 @@ _respawnVariables pushBack "ACE_PersistentFunctions"; { _unit setVariable [_x, _unit getVariable _x, true]; } forEach _respawnVariables; - -// fix speaker after respawn -[_unit, format ["{_this setSpeaker '%1'}", speaker _unit], 2] call FUNC(execRemoteFnc); diff --git a/addons/common/functions/fnc_setHearingCapability.sqf b/addons/common/functions/fnc_setHearingCapability.sqf index 26d8ca98ace..76837b44334 100644 --- a/addons/common/functions/fnc_setHearingCapability.sqf +++ b/addons/common/functions/fnc_setHearingCapability.sqf @@ -52,4 +52,4 @@ _lowestVolume = 1; // Set Radio mod variables. player setVariable ["tf_globalVolume", _lowestVolume]; -player setVariable ["acre_sys_core_globalVolume", _lowestVolume]; +if (!isNil "acre_api_fnc_setGlobalVolume") then { [_lowestVolume^0.33] call acre_api_fnc_setGlobalVolume; }; diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 9d93b9e62d6..4d81ef35356 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -58,7 +58,7 @@ if (isNil _name) then { /*_settingData = [ _name, _typeName, - _isClientSetable, + _isClientSettable, _localizedName, _localizedDescription, _possibleValues, @@ -68,7 +68,7 @@ if (isNil _name) then { _settingData = [ _name, _typeName, - (getNumber (_optionEntry >> "isClientSetable")) > 0, + (getNumber (_optionEntry >> "isClientSettable")) > 0, getText (_optionEntry >> "displayName"), getText (_optionEntry >> "description"), getArray (_optionEntry >> "values"), diff --git a/addons/common/functions/fnc_setVolume.sqf b/addons/common/functions/fnc_setVolume.sqf index ee2c42e39c8..133a09bd24e 100644 --- a/addons/common/functions/fnc_setVolume.sqf +++ b/addons/common/functions/fnc_setVolume.sqf @@ -27,8 +27,8 @@ if (_setVolume) then { player setVariable ["tf_unable_to_use_radio", false]; // ACRE2 - [NORMAL_LEVEL] call acre_api_fnc_setGlobalVolume; - player setVariable ["acre_sys_core_isDisabled", false, true]; + if (!isNil "acre_api_fnc_setGlobalVolume") then { [NORMAL_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; }; + player setVariable ["acre_sys_core_isDisabled", false, true]; } else { // Vanilla Game @@ -40,7 +40,7 @@ if (_setVolume) then { player setVariable ["tf_unable_to_use_radio", true]; // ACRE2 - [MUTED_LEVEL] call acre_api_fnc_setGlobalVolume; + if (!isNil "acre_api_fnc_setGlobalVolume") then { [MUTED_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; }; player setVariable ["acre_sys_core_isDisabled", true, true]; }; diff --git a/addons/common/functions/fnc_unmuteUnit.sqf b/addons/common/functions/fnc_unmuteUnit.sqf index 8de7708d4b8..94ba72f5a49 100644 --- a/addons/common/functions/fnc_unmuteUnit.sqf +++ b/addons/common/functions/fnc_unmuteUnit.sqf @@ -1,23 +1,39 @@ /* * Author: commy2 * - * Unmutes the unit. + * Unmutes the unit. Only unmutes if the last reason was removed. * * Argument: * 0: Unit (Object) + * 1: Reason to unmute the unit. (String) * * Return value: * Nothing */ #include "script_component.hpp" -private ["_unit", "_speaker"]; +private ["_unit", "_reason"]; _unit = _this select 0; +_reason = _this select 1; if (isNull _unit) exitWith {}; +// remove reason to mute to the unit +private "_muteUnitReasons"; +_muteUnitReasons = _unit getVariable [QGVAR(muteUnitReasons), []]; + +if (_reason in _muteUnitReasons) then { + _muteUnitReasons deleteAt (_muteUnitReasons find _reason); + _unit setVariable [QGVAR(muteUnitReasons), _muteUnitReasons, true]; +}; + +// don't unmute if there is another mute reason! +if (count _muteUnitReasons > 0) exitWith {}; + +private "_speaker"; _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""]; + if (_speaker == "") exitWith {}; -[0, format ["{(_this select 1) setSpeaker '%1'}", _speaker], _unit, "ACE_Speaker"] call FUNC(execPersistentFnc); +["setSpeaker", _unit, [_unit, _speaker]] call FUNC(targetEvent); diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index c66cc22992c..ade58c3742e 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,5 +1,4 @@  - @@ -42,12 +41,12 @@ ACE Options ACE Optionen Opciones ACE - Opcje ACE - ACE Nastavení - ACE Options + Ustawienia ACE + Nastavení ACE + Options ACE ACE Настройки Opções do ACE - ACE Opciók + ACE Beállítások Opzioni ACE @@ -248,7 +247,7 @@ Aktion abgebrochen. Acción cancelada. Przerwano czynność - Akce přerušena + Akce přerušena. Action annulée. Действие отменено. Ação cancelada. @@ -298,22 +297,29 @@ Без голоса Nincs hang Senza voce + Pas de voix Accept Requests Anfrage akzeptieren Aceptar peticiones Akceptuj prośby + Přijmout žádost Accetta Richieste - Подтвердить запросы + Accepter requête + Принять запросы + Kérések elfogadása Decline Requests Anfrage ablehnen Rechazar peticiones Ignoruj prośby + Zamítnout žádost Rifiuta Richieste Отклонить запросы + Rejeter requête + Kérések elutasítása Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -321,7 +327,10 @@ Acepta peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. 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. + Más játékosok általi kérések elfogadása. Ezek a kérések vonatkozhatnak a felszerelés használatára/megosztására, valamint különböző cselekményekre. Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions. @@ -329,7 +338,10 @@ Rechazar peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. 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. + Más játékosok általi kérések elutasítása. Ezek a kérések vonatkozhatnak a felszerelés használatára/megosztására, valamint különböző cselekményekre. Feedback icons @@ -337,6 +349,10 @@ Iconos de respuesta Icone informative Иконки состояний + Ikony pomocnicze + Icones d'information + Pomocné ikony + Visszajelző ikonok Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. @@ -344,6 +360,10 @@ Seleccionar la posición de o desactivar los íconos de respuesta en la pantalla. Estos iconos se mostrarán para proporcionar información adicional sobre el estado de su personaje y las acciones a realizar. 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é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í. + Itt beállítható a visszajelző ikonok képernyőn lévő helyzete és jelenléte. Ezek az ikonok extra visszajelzést biztosítanak a karaktered állapotán és végrehajtott cselekvésein. Progress bar location @@ -351,13 +371,21 @@ Ubicación de la barra de progreso Posizione della barra di avanzamento Положение прогресс-бара + Lokalizacja paska postępu + Position de la barre de progression + Pozice ukazetele průběhu činnosti + Állapotjelző sáv helyzete 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 + Appliquer la postion de la barre de progression sur l'écran + Nastavuje pozici ukazetele průběhu činnosti na vaší obrazovce. + Itt beállítható az állapotjelző sáv képernyődön lévő helyzete. Hint Background color @@ -365,6 +393,10 @@ Color de fondo de las notificaciones Sfondo dei Suggerimenti Цвет фона всплывающих подсказок + Kolor tła powiadomień + Notification: couleur de l'arrière plan + Barva pozadí nápovědy + Súgó háttérszíne The color of the background from the ACE hints. @@ -372,6 +404,10 @@ El color de fondo de las notificaciones del ACE Il colore di sfondo dei suggerimenti dell'ACE. Цвет фона всплывающий подсказок АСЕ. + Kolor tła dla powiadomień ACE + Notifications ACE: couleur de l'arrière plan + Barva pozadí ACE nápověd. + Az ACE-súgók hátterének színe. Hint text font color @@ -379,27 +415,43 @@ Color del texto de las notificaciones Testo dei Suggerimenti Цвет шрифта всплывающих подсказок + Kolor tekstu powiadomień + Notification: couleur du texte + Barva fontu nápověd. + Súgószöveg betűinek színe 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. + 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. + Az ACE-súgók betűkészletének színek. Ez a szín alapértelmezett az összes szövegre az ACE-súgórendszerben, ha a súgószöveg maga nem ad meg más színt. Banana Banane Banana + Banán Banana Банан + Banan + Banane + Banán A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa. - Die Banane ist eine essbare Frucht, biologisch betrachtet jedoch eine Beere. Sie wächst an unterschiedlichen, krautartigen Gewächsen aus der Familie der Musa. + Die Bananen (Musa) sind eine Pflanzengattung in der Familie der Bananengewächse (Musaceae) innerhalb der Einkeimblättrigen Pflanzen (Monokotyledonen). Una banana es una fruta comestible, botanicamente una baya, producida por varios tipos de grandes plantas herbáceas del género Musa. + Banán je protáhlé ovoce a plod banánovníku (epigeická bobule). 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). + A banán egy ehető gyümölcs, technikai szempontból bogyótermés, melyet több fürtvirágzatú növény termel a Musa rendszertani nemzetségben. + Rodzaj roślin z rodziny bananowatych, obejmujący około 80 gatunków.<br />Przedstawiciele są typowymi przedstawicielami flory międzyzwrotnikowej Azji, Afryki i Australii.<br />Część gatunków dostarcza jadalnych owoców. Słowo banan pochodzi prawdopodobnie od arabskiego słowa banan, co oznacza palec, lub afrykańskiego języka wolof, w którym rośliny te określa się mianem banaana. + Une banane est un fruit qui, d'un point de vue botanique, fait partie du groupe des baies. Produite par plusieurs sortes de grandes plantes à fleurs herbacées du type Musa. - \ No newline at end of file + diff --git a/addons/disarming/CfgVehicles.hpp b/addons/disarming/CfgVehicles.hpp index 5a85dc12874..381aaed93e5 100644 --- a/addons/disarming/CfgVehicles.hpp +++ b/addons/disarming/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { distance = 3.5; condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog)); - icon = "\a3\Modules_F_Curator\Data\portraitRespawnInventory_ca.paa"; + icon = PATHTOF(UI\disarm.paa); exceptions[] = {}; }; }; diff --git a/addons/disarming/UI/disarm.paa b/addons/disarming/UI/disarm.paa new file mode 100644 index 00000000000..d13f38daee4 Binary files /dev/null and b/addons/disarming/UI/disarm.paa differ diff --git a/addons/disarming/stringtable.xml b/addons/disarming/stringtable.xml index f4d324bfcd9..508c9f1d3dd 100644 --- a/addons/disarming/stringtable.xml +++ b/addons/disarming/stringtable.xml @@ -1,10 +1,12 @@  - - - - Open Inventory - Abrir inventario - - + + + Open Inventory + Öffne Inventar + Otwórz ekwipunek + Otevřít inventář + Abrir inventario + + diff --git a/addons/disposable/stringtable.xml b/addons/disposable/stringtable.xml index b89bda86445..2aad0a42e7d 100644 --- a/addons/disposable/stringtable.xml +++ b/addons/disposable/stringtable.xml @@ -1,36 +1,35 @@  - - - - Used Tube - Benutze Einwegwaffe - Tube utilisé - Použitý odpalovač - Zużyta tuba - Lanzador utilizado - Használt cső - Отстрелянная труба - - - Used disposable rocket launcher - Benutzter Einweg-Raketenwerfer - Lance-roquette à usage unique utilisé - Použitý raketomet - Zużyta tuba granatnika jednorazowego użytku - Lanzador desechable utilizado - Használt rakétavető - Отстрелянная одноразовая пусковая установка - - - Preloaded Missile Dummy - Vorgeladene Racketennachbildung - Preloaded Missile Dummy - Preloaded Missile Dummy - Preloaded Missile Dummy - Preloaded Missile Dummy - Preloaded Missile Dummy - Заряженная ракетная пустышка - - + + + Used Tube + Benutze Einwegwaffe + Tube utilisé + Použitý odpalovač + Zużyta rura + Lanzador utilizado + Elhasznált kilövőcső + Отстрелянная труба + + + Used disposable rocket launcher + Benutzter Einweg-Raketenwerfer + Lance-roquette à usage unique utilisé + Použitý raketomet + Zużyta rura granatnika jednorazowego użytku + Lanzador desechable utilizado + Elhasznált eldobható rakétavető + Отстрелянная одноразовая пусковая установка + + + Preloaded Missile Dummy + Vorgeladene Racketennachbildung + Missile préchargé Dummy + Přednabitá dummy střela + Wstępnie załadowana atrapa pocisku + Preloaded Missile Dummy + Előtöltött műrakéta + Заряженная ракетная пустышка + + diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 1874d7caac2..1c704796f82 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -1,57 +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 - - Слишком тяжело - - - 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 + Слишком тяжело + Moc težké + Az objektum túl nehéz + + + Carry + Tragen + Portar + Nieś + Porter + Nést + Carregar + Trascina + Felvevés + Нести + + diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 25c5a878853..05410e621e7 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,498 +1,502 @@  - - - Explosives - Sprengstoffe - Explosivos - Ładunki wybuchowe - Explosifs - Výbušniny - Esplosivi - Robbanóanyagok - Explosivos - Взрывчатка - - - Place >> - Platzieren >> - Colocar >> - Umieść >> - Placer >> - Položit >> - Piazza >> - Lerakás >> - Colocar >> - Установить >> - - - Detonate >> - Zünden >> - Detonar >> - Detonuj >> - Mise à feu >> - Odpálit >> - Detona >> - Robbantás >> - Detonar >> - Подрыв >> - - - Explosive code: %1 - Sprengstoffcode: %1 - Código del explosivo: %1 - Kod ładunku: %1 - Code explosif: %1 - Kód výbušniny: %1 - Codice dell'esplosivo : %1 - Robbanóanyag kódja: %1 - Código do explosivo: %1 - Код подрыва: %1 - - - Place - Platzieren - Colocar - Umieść - Placer - Položit - Piazza - Elhelyezés - Colocar - Установить - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Annulla - Mégsem - Cancelar - Отмена - - - + Modifier, rotates - + Modifikator, drehen - + Modificador, girar - + Modificateur, tourner - + Modificatore, rotazione - + Otočit - + Változtatás, forgatás - + modyfikator, obracanie - + Modificador, rotaciona - + Bращать - - - Turn On Thor III - Thor III aktivieren - Encender Thor III - Włącz Thor III - Allumer Thor III - Zapnout Thor III - Accendi Thor III - Thor III bekapcsolása - Ativar Thor III - Активировать Thor III - - - Turn Off Thor III - Thor III deaktivieren - Apagar Thor III - Wyłącz Thor III - Éteindre Thor III - Vypnout Thor III - Spegni Thor III - Thor III kikapcsolása - Desativar Thor III - Деактивировать Thor III - - - Cellphone - Mobiltelefon - Télefono móvil - Telefon komórkowy - Téléphone Portable - Telefon - Cellulare - Mobil - Celular - Сотовый телефон - - - Used to remotely trigger explosives - Wird benutzt um Sprengstoffe fernzuzünden - Usado para detonar remotamente explosivos - Używany do zdalnego detonowania ładunków wybuchowych - Utilisé pour déclencher des explosifs à distance - Používaný ke vzdálenému odpalování výbušnin - Usato per l'attivazione a distanza degli esplosivi - Robbanóanyagok távoli robbantásához - Usado para acionar explosivos remotamente - Используется для удаленной детонации СВУ - - - M57 Firing Device - M57 Zündvorrichtung - Dispositivo de detonación M57 - Zapalnik M57 - M57 Dispositif de mise à feu - M57 Odpalovací Zařízení - Detonatore M57 - M57 Detonátor - M57 Dispositivo de Detonação - Взрыватель M57 - - - Used to remotely trigger explosives - Wird benutzt um Sprengstoffe fernzuzünden - Usado para detonar remotamente explosivos - Używany do zdalnego detonowania ładunków wybuchowych - Utilisé pour déclencher des explosifs à distance - Použévané ke vzdálenému odpalování výbušnin - Usato per l'attivazione a distanza degli esplosivi - Robbanóanyagok távoli robbantásához - Usado para acionar explosivos remotamente - Используется для удаленной детонации зарядов - - - M26 Firing Device - M26 Zündvorrichtung - Dispositivo de detonación MK26 - Zapalnik M26 - M26 Dispositif de mise à feu - M26 Odpalovací Zařízení - Detonatore M26 - M26 Detonátor - M26 Dispositivo de Detonação - Взрыватель M26 - - - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - M152 RAMS - - - Defusal Kit - Entschärfungskit - Kit de desactivación - Zestaw do rozbrajania - Kit de désamorçage - Zneškodňovací sada - Kit E.O.D. - Hatástalanító felszerelés - Kit de desarme - Комплект разминирования - - - Allows defusing of explosives - Erlaubt die Entschärfung von Sprengstoffen - Permite desactivar explosivos - Umożliwia rozbrajanie ładunków wybuchowych - Permet de désamorçer des explosifs - Dovoluje zneškodňování výbušnin - Consente la disattivazione degli ordigni esplosivi - Robbanóanyagok hatástalanításához - Permite o desarme de explosivos - Позволяет обезвреживать ВУ - - - Add to Speed Dial - Zur Schnellauswahl hinzufügen - Agregar a marcado rápido - Dodaj do szybkiego wybierania - Ajouter à la composition rapide - Přidat jako rychlou volbu - Aggiungi alla selezione rapida - Hozzáadás gyorshíváshoz - Adicionar à ligação rápida - Добавить в ускоренный набор - - - Clear - Löschen - Borrar - Usuń - Désamorçé - Čistý - Libera - Törlés - Limpar - Очистить - - - Dial - Wählen - Marcar - Wybierz mumer - Composer - Vytočit - Composizione numero - Tárcsázás - Discar - Hабрать - - - Up - Hoch - Arriba - W górę - Haut - Nahoru - Sopra - Fel - Cima - Вызов - - - Down - Runter - Abajo - W dół - Bas - Dolu - Sotto - Le - Baixo - Сброс - - - Cancel - Abbrechen - Cancelar - Anuluj - Annuler - Zrušit - Annulla - Mégsem - Cancelar - Отмена - - - Detonate Menu - "Zünden"-Menü - Menú de detonación - Menu detonowania - Menu de mise à feu - Menu Detonace - Menù di detonazione - Robbantás menü - Menu de detonação - Меню подрыва - - - Place Menu - "Platzieren"-Menü - Menú de colocación - Menu umieszczania - Menu Placement - Menu Umístění - Menù di collocamento - Lerakás menü - Menu de posicionamento - Меню детонации - - - Defuse - Entschärfen - Desactivar - Rozbrój - Désamorçer - Zneškodnit - Disinnesca - Hatástalanítás - Desarmar - Обезвредить - - - Defusing Explosive... - Entschärfe Sprengstoff... - Desactivando explosivo... - Rozbrajanie ładunku... - Désamorçage des explosifs... - Zneškodňuji Výbušninu... - Esposivo in fase di disattivazione... - Robbanóanyag hatástalaníása... - Desarmando Explosivo... - Обезвреживание... - - - Timer - Zeitzünder - Temporizador - Czasomierz - Retard - Časovač - Cronometro - Időzített - Timer - Таймер - - - Time: %1m %2s - Zeit: %1m %2s - Tiempo: %1m %2s - Czas: %1m %2s - Temps : %1m %2s - Čas: %1m %2s - Tempo : %1m %2s - Idő: %1m %2s - Tempo: %1m %2s - Время: %1m %2c - - - Set Time - Zeit einstellen - Configurar tiempo - Ustaw czas - Régler retard - Nastavit Čas - Modifica il conto alla rovescia - Idő állítása - Configurar Tempo - Установить время - - - Select a Trigger - Wähle einen Zünder - Seleccionar un disparador - Wybierz zapalnik - Sélectionner une mise à feu - Zvolit Detonátor - Seleziona un Attivatore - Detonátor kiválasztása - Selecionar um Gatilho - Выберите детонатор - - - Select - Wählen - Seleccionar - Wybierz - Sélectionner - Zvolit - Seleziona - Kiválasztás - Selecionar - Выбрать - - - Pressure Plate - Płyta naciskowa - Placa de presión - Druckplatte - Plaque de pression - Nášlapná nástraha - Piastra a Pressione - Nyomólap - Placa de pressão - Давление - - - Tripwire - Linka naciągu - Cable trampa - Stolperdraht - Fil de butée - Nástražný drát - Filo a Inciampo - Botlódrót - Linha de tração - Растяжка - - - IR Sensor - Czujnik podczerwieni - Sensor IR - Infrarotsensor - Capteur IR - IR Značkovač - Sensore IR - IR szenzor - Sensor IV - ИК сенсор - - - No triggers available for %1 - Brak dostępnych zapalników dla %1 - No hay detonadores disponibles para %1 - Keine Auslöser vorhanden für %1 - Pas de mise à feu disponible pour %1 - Žádný detonátor k dispozici pro %1 - Nessun attivatore disponibile per %1 - Nincs detonátor a %1 - Nenhum gatilho disponível para %1 - Нет доступных взрывателей для %1 - - - IR Sensor (Side Attack) - Czujnik podczerwieni (wybuch na bok) - Sensor IR (ataque lateral) - Infrarotsensor (Seitenangriff) - Capteur IR (de flanc) - IR Značkovač (Výbuch stranou) - Sensore IR (Attacco laterale) - IR Sensor (Side Attack) - Sensor infravermelho (ataque lateral) - ИК (детонация вбок) - - - Magnetic Influence Sensor (Bottom Attack) - Czujnik magnetyczny (wybuch w górę) - Sensor IM (ataque inferior) - Magnetfeldsensor (Bodenangriff) - Capteur Magnétique (par le bas) - Magnetický Senzor (Výbuch ze spoda) - Sensore Magnetico di Prossimità (Attacco inferiore) - Mágneses (Bottom Attack) - Influência magnética (ataque inferior) - Магнитный (детонация вверх) - - - No explosives on trigger. - Keine Sprengladungen auf diesem Auslöser. - Ningún explosivo en el detonador. - Pas d'explosif à mettre à feu. - Nessun esplosivo sul sensore. - Žádná výbušnina k odpálení. - Nincs robbanóanyag a detonátorhoz. - Brak ładunków na zapalnik. - Nenhum explosivo no gatilho. - Нет доступных ВУ для взрывателя. - - - Dead Man's Switch - Totmannschalter - Mise à feu par relâchement de pression - Spínač mrtvého muže - Czuwak - Detonador de hombre muerto - Dead Man's Switch - Ловушка мертвеца - - - Used to remotely trigger explosives when released. - Zündet Sprengladungen wenn losgelassen. - Déclenche la mise à feu d'un explosif lorsqu'il est libéré. - Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny - Używany w celu zdalnej detonacji ładunków kiedy jego operator zostanie zabity. - Utilizado para detonar explosivos remotamente al soltarlo. - Robbanóanyagok távoli robbantásához - Используется для дистанционного подрыва, после смерти оператора. - - - Pick up - Aufheben - Recoger - - + + + Explosives + Sprengstoffe + Explosivos + Ładunki wybuchowe + Explosifs + Výbušniny + Esplosivi + Robbanóanyagok + Explosivos + Взрывчатка + + + Place >> + Platzieren >> + Colocar >> + Umieść >> + Placer >> + Položit >> + Piazza >> + Elhelyezés >> + Colocar >> + Установить >> + + + Detonate >> + Zünden >> + Detonar >> + Detonuj >> + Mise à feu >> + Odpálit >> + Detona >> + Robbantás >> + Detonar >> + Подрыв >> + + + Explosive code: %1 + Sprengstoffcode: %1 + Código del explosivo: %1 + Kod ładunku: %1 + Code explosif: %1 + Kód výbušniny: %1 + Codice dell'esplosivo : %1 + Robbanóanyag kódja: %1 + Código do explosivo: %1 + Код подрыва: %1 + + + Place + Platzieren + Colocar + Umieść + Placer + Položit + Piazza + Elhelyezés + Colocar + Установить + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Annulla + Mégsem + Cancelar + Отмена + + + + Modifier, rotates + + Modifikator, drehen + + Modificador, girar + + Modificateur, tourner + + Modificatore, rotazione + + Modifikátor, otočit + + Változtatás, forgatás + + Modyfikator, obrót + + Modificador, rotaciona + + Bращать + + + Turn On Thor III + Thor III aktivieren + Encender Thor III + Włącz Thor III + Allumer Thor III + Zapnout Thor III + Accendi Thor III + Thor III bekapcsolása + Ativar Thor III + Активировать Thor III + + + Turn Off Thor III + Thor III deaktivieren + Apagar Thor III + Wyłącz Thor III + Éteindre Thor III + Vypnout Thor III + Spegni Thor III + Thor III kikapcsolása + Desativar Thor III + Деактивировать Thor III + + + Cellphone + Mobiltelefon + Télefono móvil + Telefon komórkowy + Téléphone Portable + Telefon + Cellulare + Mobiltelefon + Celular + Сотовый телефон + + + Used to remotely trigger explosives + Wird benutzt um Sprengstoffe fernzuzünden + Usado para detonar remotamente explosivos + Używany do zdalnego detonowania ładunków wybuchowych + Utilisé pour déclencher des explosifs à distance + Používaný ke vzdálenému odpalování výbušnin + Usato per l'attivazione a distanza degli esplosivi + Robbanóanyagok távoli robbantásához való + Usado para acionar explosivos remotamente + Используется для удаленной детонации СВУ + + + M57 Firing Device + M57 Zündvorrichtung + Dispositivo de detonación M57 + Zapalnik M57 + M57 Dispositif de mise à feu + Odpalovací zařízení M57 + Detonatore M57 + M57 Gyújtóeszköz + M57 Dispositivo de Detonação + Взрыватель M57 + + + Used to remotely trigger explosives + Wird benutzt um Sprengstoffe fernzuzünden + Usado para detonar remotamente explosivos + Używany do zdalnego detonowania ładunków wybuchowych + Utilisé pour déclencher des explosifs à distance + Používané ke vzdálenému odpalování výbušnin + Usato per l'attivazione a distanza degli esplosivi + Robbanóanyagok távoli robbantásához + Usado para acionar explosivos remotamente + Используется для удаленной детонации зарядов + + + M26 Firing Device + M26 Zündvorrichtung + Dispositivo de detonación MK26 + Zapalnik M26 + M26 Dispositif de mise à feu + Odpalovací zařízení M26 + Detonatore M26 + M26 Gyújtóeszköz + M26 Dispositivo de Detonação + Взрыватель M26 + + + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + M152 RAMS + + + Defusal Kit + Entschärfungskit + Kit de desactivación + Zestaw do rozbrajania + Kit de désamorçage + Zneškodňovací sada + Kit E.O.D. + Hatástalanító felszerelés + Kit de desarme + Комплект разминирования + + + Allows defusing of explosives + Erlaubt die Entschärfung von Sprengstoffen + Permite desactivar explosivos + Umożliwia rozbrajanie ładunków wybuchowych + Permet de désamorçer des explosifs + Dovoluje zneškodňování výbušnin + Consente la disattivazione degli ordigni esplosivi + Robbanóanyagok hatástalanítását teszi lehetővé + Permite o desarme de explosivos + Позволяет обезвреживать ВУ + + + Add to Speed Dial + Zur Schnellauswahl hinzufügen + Agregar a marcado rápido + Dodaj do szybkiego wybierania + Ajouter à la composition rapide + Přidat jako rychlou volbu + Aggiungi alla selezione rapida + Hozzáadás a gyorstárcsázóhoz + Adicionar à ligação rápida + Добавить в ускоренный набор + + + Clear + Löschen + Borrar + Usuń + Désamorçé + Čistý + Libera + Törlés + Limpar + Очистить + + + Dial + Wählen + Marcar + Wybierz mumer + Composer + Vytočit + Composizione numero + Tárcsázás + Discar + Hабрать + + + Up + Hoch + Arriba + W górę + Haut + Nahoru + Sopra + Fel + Cima + Вызов + + + Down + Runter + Abajo + W dół + Bas + Dolu + Sotto + Le + Baixo + Сброс + + + Cancel + Abbrechen + Cancelar + Anuluj + Annuler + Zrušit + Annulla + Mégsem + Cancelar + Отмена + + + Detonate Menu + "Zünden"-Menü + Menú de detonación + Menu detonowania + Menu de mise à feu + Menu Detonace + Menù di detonazione + Robbantási menü + Menu de detonação + Меню подрыва + + + Place Menu + "Platzieren"-Menü + Menú de colocación + Menu umieszczania + Menu Placement + Menu Umístění + Menù di collocamento + Elhelyezési menü + Menu de posicionamento + Меню детонации + + + Defuse + Entschärfen + Desactivar + Rozbrój + Désamorçer + Zneškodnit + Disinnesca + Hatástalanítás + Desarmar + Обезвредить + + + Defusing Explosive... + Entschärfe Sprengstoff... + Desactivando explosivo... + Rozbrajanie ładunku... + Désamorçage des explosifs... + Zneškodňuji Výbušninu... + Esposivo in fase di disattivazione... + Robbanóanyag hatástalanítása... + Desarmando Explosivo... + Обезвреживание... + + + Timer + Zeitzünder + Temporizador + Czasomierz + Minuteur + Časovač + Cronometro + Időzítő + Timer + Таймер + + + Time: %1m %2s + Zeit: %1m %2s + Tiempo: %1m %2s + Czas: %1m %2s + Temps : %1m %2s + Čas: %1m %2s + Tempo : %1m %2s + Idő: %1m %2s + Tempo: %1m %2s + Время: %1m %2c + + + Set Time + Zeit einstellen + Configurar tiempo + Ustaw czas + Régler minuteur + Nastavit Čas + Modifica il conto alla rovescia + Idő beállítása + Configurar Tempo + Установить время + + + Select a Trigger + Wähle einen Zünder + Seleccionar un disparador + Wybierz zapalnik + Sélectionner une mise à feu + Zvolit Detonátor + Seleziona un Attivatore + Gyújtóeszköz kiválasztása + Selecionar um Gatilho + Выберите детонатор + + + Select + Wählen + Seleccionar + Wybierz + Sélectionner + Zvolit + Seleziona + Kiválasztás + Selecionar + Выбрать + + + Pressure Plate + Płyta naciskowa + Placa de presión + Druckplatte + Plaque de pression + Nášlapná nástraha + Piastra a Pressione + Nyomólap + Placa de pressão + Давление + + + Tripwire + Linka naciągu + Cable trampa + Stolperdraht + Fil de détente + Nástražný drát + Filo a Inciampo + Botlódrót + Linha de tração + Растяжка + + + IR Sensor + Czujnik podczerwieni + Sensor IR + Infrarotsensor + Capteur IR + IR Značkovač + Sensore IR + Infravörös szenzor + Sensor IV + ИК сенсор + + + No triggers available for %1 + Brak dostępnych zapalników dla %1 + No hay detonadores disponibles para %1 + Keine Auslöser vorhanden für %1 + Pas de mise à feu disponible pour %1 + Žádný detonátor k dispozici pro %1 + Nessun attivatore disponibile per %1 + Nincs elérhető gyújtóeszköz ide: %1 + Nenhum gatilho disponível para %1 + Нет доступных взрывателей для %1 + + + IR Sensor (Side Attack) + Czujnik podczerwieni (wybuch na bok) + Sensor IR (ataque lateral) + Infrarotsensor (Seitenangriff) + Capteur IR (de flanc) + IR Značkovač (Výbuch stranou) + Sensore IR (Attacco laterale) + Infravörös szenzor (Side Attack) + Sensor infravermelho (ataque lateral) + ИК (детонация вбок) + + + Magnetic Influence Sensor (Bottom Attack) + Czujnik magnetyczny (wybuch w górę) + Sensor IM (ataque inferior) + Magnetfeldsensor (Bodenangriff) + Capteur Magnétique (par le bas) + Magnetický Senzor (Výbuch ze spoda) + Sensore Magnetico di Prossimità (Attacco inferiore) + Mágneses mező érzékelő (Bottom Attack) + Influência magnética (ataque inferior) + Магнитный (детонация вверх) + + + No explosives on trigger. + Keine Sprengladungen auf diesem Auslöser. + Ningún explosivo en el detonador. + Pas d'explosif à mettre à feu. + Nessun esplosivo sul sensore. + Žádná výbušnina k odpálení. + Nincs robbanóanyag a gyújtóeszközhöz kötve. + Brak ładunków na zapalnik. + Nenhum explosivo no gatilho. + Нет доступных ВУ для взрывателя. + + + Dead Man's Switch + Totmannschalter + Mise à feu par relâchement de pression + Spínač mrtvého muže + Czuwak + Detonador de hombre muerto + Dead Man's Switch + Ловушка мертвеца + + + Used to remotely trigger explosives when released. + Zündet Sprengladungen wenn losgelassen. + Déclenche la mise à feu d'un explosif lorsqu'il est libéré. + Používaný k vzdálenému odpálení, při uvolnění odpálí výbušniny + Używany w celu zdalnej detonacji ładunków kiedy jego operator zostanie zabity. + Utilizado para detonar explosivos remotamente al soltarlo. + Robbanóanyagok távoli robbantásához való, elengedéskor gyújt. + Используется для дистанционного подрыва, после смерти оператора. + + + Pick up + Aufheben + Recoger + Sebrat + Podnieś + Ramasser + Felszedés + + diff --git a/addons/fcs/XEH_clientInit.sqf b/addons/fcs/XEH_clientInit.sqf index d3605d87a7c..3338e739e1d 100644 --- a/addons/fcs/XEH_clientInit.sqf +++ b/addons/fcs/XEH_clientInit.sqf @@ -4,6 +4,8 @@ GVAR(enabled) = false; GVAR(time) = 0; GVAR(position) = [0,0,0]; +if (!hasInterface) exitWith {}; + #include "initKeybinds.sqf" ["infoDisplayChanged", { diff --git a/addons/fcs/stringtable.xml b/addons/fcs/stringtable.xml index 0911bbdb574..857f511fca9 100644 --- a/addons/fcs/stringtable.xml +++ b/addons/fcs/stringtable.xml @@ -1,81 +1,75 @@  - - - - Lase Target / Measure Distance - Ziel anlasern / Entfernung Messen - Télémétrer la cible - Naświetl cel / Zmierz odległość - Označit cíl / Změřit vzdálenost - Iluminar objetivo / Medir distancia - - Подсветить цель / Замерить расстояние - - - Zeroed To - Haltepunkt - Fijado a - Wyzerowany na - Nastaveno na - Zéroté à - Выставлено на - Nullázás - Fixado em - Azzeramento a - - - Adjust FCS Range (Up) - Entfernung des FLS erhöhen - Zwiększ zasięg FCS - Ajustar distancia del FCS (arriba) - Nastavit FCS Náměr (nahoru) - Augmenter la distance du SCT - FCS tartomány állítása (Fel) - Ajustar distância do FCS (Acima) - Aumentare la distanza dell'FCS - Диапазон СУО (Выше) - - - Adjust FCS Range (Down) - Entfernung des FLS verringern - Zmniejsz zasięg FCS - Ajustar distancia del FCS (abajo) - Nastavit FCS Náměr (dolů) - Réduire la distance du SCT - FCS tartomány állítása (Le) - Ajustar distância do FCS (Abaixo) - Ridurre la distanza dell'FCS - Диапазон СУО (Ниже) - - - Reset FCS - FLS zurücksetzen - Reiniciar FCS - Réinitialiser le SCT - Resetuj FCS - Resetovat FCS - FCS visszaállítása - Reiniciar FCS - Azzeramento dell'FCS - Обнулить СУО - - - FCS has been reset. - FLS wurde zurückgesetzt. - FCS reiniciado - SCT réinitialisé. - FCS został zresetowany. - FCS byl resetován. - Az FCS visszaállítva - FCS reiniciado. - L'FCS è stato azzerato - СУО обнулен. - - - \ No newline at end of file + + + Lase Target / Measure Distance + Ziel anlasern / Entfernung Messen + Télémétrer la cible + Naświetl cel / Zmierz odległość + Označit cíl / Změřit vzdálenost + Iluminar objetivo / Medir distancia + Подсветить цель / Замерить расстояние + Célpont lézerezése / Távolság Bemérése + + + Zeroed To + Haltepunkt + Fijado a + Wyzerowany na + Nastaveno na + Zéroté à + Выставлено на + Nullázási táv + Fixado em + Azzeramento a + + + Adjust FCS Range (Up) + Entfernung des FLS erhöhen + Zwiększ zasięg SKO + Ajustar distancia del FCS (arriba) + Nastavit FCS Náměr (nahoru) + Augmenter la distance du SCT + FCS tartomány állítása (Fel) + Ajustar distância do FCS (Acima) + Aumentare la distanza dell'FCS + Диапазон СУО (Выше) + + + Adjust FCS Range (Down) + Entfernung des FLS verringern + Zmniejsz zasięg SKO + Ajustar distancia del FCS (abajo) + Nastavit FCS Náměr (dolů) + Réduire la distance du SCT + FCS tartomány állítása (Le) + Ajustar distância do FCS (Abaixo) + Ridurre la distanza dell'FCS + Диапазон СУО (Ниже) + + + Reset FCS + FLS zurücksetzen + Reiniciar FCS + Réinitialiser le SCT + Resetuj SKO + Resetovat FCS + FCS visszaállítása + Reiniciar FCS + Azzeramento dell'FCS + Обнулить СУО + + + FCS has been reset. + FLS wurde zurückgesetzt. + FCS reiniciado + SCT réinitialisé. + SKO został zresetowany. + FCS byl resetován. + FCS visszaállítva. + FCS reiniciado. + L'FCS è stato azzerato + СУО обнулен. + + + diff --git a/addons/flashsuppressors/stringtable.xml b/addons/flashsuppressors/stringtable.xml index 7490ce42a6f..d3185fc2b08 100644 --- a/addons/flashsuppressors/stringtable.xml +++ b/addons/flashsuppressors/stringtable.xml @@ -1,90 +1,90 @@  - + - - - Flash Suppressor (6.5 mm) - Lángrejtő (6,5 mm) - Mündungsfeuerdämpfer (6,5 mm) - Soppressore di fiamma (6.5mm) - Supressor de Clarão (6,5mm) - Tłumik płomieni (6,5 mm) - Tlumič záblesku (6,5 mm) - Cache-flamme (6,5 mm) - Пламегаситель (6,5 мм) - Supresor (6,5 mm) - - - Flash Suppressor (7.62 mm) - Lángrejtő (7,62 mm) - Mündungsfeuerdämpfer (7,62 mm) - Soppressore di fiamma (7.62mm) - Supressor de Clarão (7,62mm) - Tłumik płomieni (7,62 mm) - Tlumič záblesku (7,62 mm) - Cache-flamme (7,62 mm) - Пламегаситель (7,62 мм) - Supresor (7,62 mm) - - - Flash Suppressor (5.56 mm) - Lángrejtő (5,56 mm) - Mündungsfeuerdämpfer (5,56 mm) - Soppressore di fiamma (5.56mm) - Supressor de Clarão (5,56mm) - Tłumik płomieni (5,56 mm) - Tlumič záblesku (5,56 mm) - Cache-flamme (5,56 mm) - Пламегаситель (5,56 мм) - Supresor (5,56 mm) - - - Flash Suppressor (.45 ACP) - Lángrejtő (.45 ACP) - Mündungsfeuerdämpfer (.45 ACP) - Soppressore di fiamma (.45 ACP) - Supressor de Clarão (.45 ACP) - Tłumik płomieni (.45 ACP) - Tlumič záblesku (.45 ACP) - Cache-flamme (.45 ACP) - Пламегаситель (.45 ACP) - Supresor (.45 ACP) - - - Flash Suppressor (9 mm) - Lángrejtő (9 mm) - Mündungsfeuerdämpfer (9 mm) - Soppressore di fiamma (9 mm) - Supressor de Clarão (9mm) - Tłumik płomieni (9 mm) - Tlumič záblesku (9 mm) - Cache-flamme (9 mm) - Пламегаситель (9 мм) - Supresor (9 mm) - - - Flash Suppressor (.338) - Lángrejtő (.338) - Mündungsfeuerdämpfer (.338) - Soppressore di fiamma (.338) - Supressor de Clarão (.338) - Tłumik płomieni (.338) - Tlumič záblesku (.338) - Cache-flamme (.338) - Пламегаситель (.338) - Supresor (.338) - - - Flash Suppressor (9.3 mm) - Lángrejtő (9,3 mm) - Mündungsfeuerdämpfer (9,3 mm) - Soppressore di fiamma (9.3mm) - Supressor de Clarão (9,3mm) - Tłumik płomieni (9,3 mm) - Tlumič záblesku (9,3 mm) - Cache-flamme (9,3 mm) - Пламегаситель (9,3 мм) - Supresor (9,3 mm) - - - + + + Flash Suppressor (6.5 mm) + Lángrejtő (6,5 mm) + Mündungsfeuerdämpfer (6,5 mm) + Soppressore di fiamma (6.5mm) + Supressor de Clarão (6,5mm) + Tłumik płomienia (6,5 mm) + Tlumič plamene (6,5 mm) + Cache-flamme (6,5 mm) + Пламегаситель (6,5 мм) + Supresor (6,5 mm) + + + Flash Suppressor (7.62 mm) + Lángrejtő (7,62 mm) + Mündungsfeuerdämpfer (7,62 mm) + Soppressore di fiamma (7.62mm) + Supressor de Clarão (7,62mm) + Tłumik płomienia (7,62 mm) + Tlumič plamene (7,62 mm) + Cache-flamme (7,62 mm) + Пламегаситель (7,62 мм) + Supresor (7,62 mm) + + + Flash Suppressor (5.56 mm) + Lángrejtő (5,56 mm) + Mündungsfeuerdämpfer (5,56 mm) + Soppressore di fiamma (5.56mm) + Supressor de Clarão (5,56mm) + Tłumik płomienia (5,56 mm) + Tlumič plamene (5,56 mm) + Cache-flamme (5,56 mm) + Пламегаситель (5,56 мм) + Supresor (5,56 mm) + + + Flash Suppressor (.45 ACP) + Lángrejtő (.45 ACP) + Mündungsfeuerdämpfer (.45 ACP) + Soppressore di fiamma (.45 ACP) + Supressor de Clarão (.45 ACP) + Tłumik płomienia (.45 ACP) + Tlumič plamene (.45 ACP) + Cache-flamme (.45 ACP) + Пламегаситель (.45 ACP) + Supresor (.45 ACP) + + + Flash Suppressor (9 mm) + Lángrejtő (9 mm) + Mündungsfeuerdämpfer (9 mm) + Soppressore di fiamma (9 mm) + Supressor de Clarão (9mm) + Tłumik płomienia (9 mm) + Tlumič plamene (9 mm) + Cache-flamme (9 mm) + Пламегаситель (9 мм) + Supresor (9 mm) + + + Flash Suppressor (.338) + Lángrejtő (.338) + Mündungsfeuerdämpfer (.338) + Soppressore di fiamma (.338) + Supressor de Clarão (.338) + Tłumik płomienia (.338) + Tlumič záblesku (.338) + Cache-flamme (.338) + Пламегаситель (.338) + Supresor (.338) + + + Flash Suppressor (9.3 mm) + Lángrejtő (9,3 mm) + Mündungsfeuerdämpfer (9,3 mm) + Soppressore di fiamma (9.3mm) + Supressor de Clarão (9,3mm) + Tłumik płomienia (9,3 mm) + Tlumič záblesku (9,3 mm) + Cache-flamme (9,3 mm) + Пламегаситель (9,3 мм) + Supresor (9,3 mm) + + + \ No newline at end of file diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index e2477347ce2..42767ab2e46 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -1,13 +1,15 @@ - - - - - Disable Fragmentation - Keine Schrapnelle - Zakázat fragmentaci granátů - Desactivar fragmentación - Wyłącz głowice fragmentacyjne - Выключить разлёт осколков - - - + + + + + Disable Fragmentation + Keine Schrapnelle + Zakázat fragmentaci granátů + Desactivar fragmentación + Wyłącz fragmentację odłamków + Выключить разлёт осколков + Désactive la fragmentation + Repeszek letiltása + + + diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index efda9b54362..7e8afe4d3d4 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -247,7 +247,7 @@ class ACE_Settings { class GVAR(showInThirdPerson) { value = 0; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Goggles_ShowInThirdPerson"; }; }; diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 9b2e6fba12e..16fd227b114 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,30 +1,30 @@  - + - - - Show Goggle Effects in Third Person - Brilleneffekt in dritter Person anzeigen - Mostrar efectos de las gafas en tercera persona - Zobrazit účinky brýlí v třetí osobě - Effets de lunettes à la 3ème personne - Отображать эффект очков от третьего лица - Szemüveg effekt mutatása külső nézetből - Włącz efekty gogli w trzeciej osobie - Mostrar efeitos de óculos em Terceira Pessoa - Attiva l'effetto degli occhiali in terza persona - - - Wipe Goggles - Brille abwischen - Limpiar gafas - Vyčistit brýle - Essuyer les lunettes - Протереть очки - Szemüveg törlése - Wytrzyj gogle - Limpar Óculos - Pulisci gli occhiali - - + + + Show Goggle Effects in Third Person + Brilleneffekt in dritter Person anzeigen + Mostrar efectos de las gafas en tercera persona + Zobrazit efekt brýlí v třetí osobě + Effets de lunettes à la 3ème personne + Отображать эффект очков от третьего лица + Szemüveg-effekt mutatása külső nézetből + Włącz efekty gogli w trzeciej osobie + Mostrar efeitos de óculos em Terceira Pessoa + Attiva l'effetto degli occhiali in terza persona + + + Wipe Goggles + Brille abwischen + Limpiar gafas + Vyčistit brýle + Essuyer les lunettes + Протереть очки + Szemüveg letörlése + Wytrzyj gogle + Limpar Óculos + Pulisci gli occhiali + + \ No newline at end of file diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 3868994beee..c84ee33b33a 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -15,63 +15,74 @@ */ #include "script_component.hpp" -private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light"]; +private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount"]; PARAMS_1(_grenade); -_affected = _grenade nearEntities ["CAManBase", 50]; +_affected = _grenade nearEntities ["CAManBase", 20]; { if ((local _x) && {alive _x}) then { _strength = 1 - ((_x distance _grenade) min 15) / 15; + TRACE_3("FlashBangEffect Start",_x,(_x distance _grenade),_strength); + if (_x != ACE_player) then { //must be AI - _x disableAI "MOVE"; - _x disableAI "ANIM"; - _x disableAI "AUTOTARGET"; - _x disableAI "TARGET"; - _x disableAI "FSM"; + [_x, true] call EFUNC(common,disableAI); _x setSkill ((skill _x) / 50); [{ PARAMS_1(_unit); - _unit enableAI "MOVE"; - _unit enableAI "ANIM"; - _unit enableAI "AUTOTARGET"; - _unit enableAI "TARGET"; - _unit enableAI "FSM"; + //Make sure we don't enable AI for unconscious units + if (!(_unit getVariable ["ace_isunconscious", false])) then { + [_unit, false] call EFUNC(common,disableAI); + }; _unit setSkill (skill _unit * 50); }, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI } else { //Do effects for player // is there line of sight to the grenade? _posGrenade = getPosASL _grenade; + _eyePos = eyePos ACE_player; //PositionASL _posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground - if (lineIntersects [_posGrenade, getPosASL _x, _grenade, _x]) then { + + _losCount = 0; + //Check for line of sight (check 4 points in case grenade is stuck in an object or underground) + { + if (!lineIntersects [(_posGrenade vectorAdd _x), _eyePos, _grenade, ACE_player]) then { + _losCount = _losCount + 1; + }; + } forEach [[0,0,0], [0,0,0.2], [0.1, 0.1, 0.1], [-0.1, -0.1, 0.1]]; + TRACE_1("Line of sight count (out of 4)",_losCount); + if (_losCount == 0) then { _strength = _strength / 10; }; - // beeeeeeeeeeeeeeeeeeeeeeeeeeeeep - if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") and _strength > 0) then { + //Add ace_hearing ear ringing sound effect + if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then { [_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging); }; // account for people looking away by slightly // reducing the effect for visual effects. - _posUnit = getPos _x; - _posGrenade = getPos _grenade; - _angleGrenade = ((_posGrenade select 0) - (_posUnit select 0)) atan2 ((_posGrenade select 1) - (_posUnit select 1)); - _angleGrenade = (_angleGrenade + 360) % 360; + _eyeDir = (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]); + _dirToUnitVector = _eyePos vectorFromTo _posGrenade; + _angleDiff = acos (_eyeDir vectorDotProduct _dirToUnitVector); - _angleView = (eyeDirection ACE_player select 0) atan2 (eyeDirection ACE_player select 1); - _angleView = (_angleView + 360) % 360; + //From 0-45deg, full effect + if (_angleDiff > 45) then { + _strength = _strength - _strength * ((_angleDiff - 45) / 120); + }; - _angleDiff = 180 - abs (abs (_angleGrenade - _angleView) - 180); - _angleDiff = ((_angleDiff - 45) max 0); + TRACE_1("Final strength for player",_strength); - _strength = _strength - _strength * (_angleDiff / 135); + + //Add ace_medical pain effect: + if ((isClass (configFile >> "CfgPatches" >> "ACE_Medical")) && {_strength > 0}) then { + [ACE_player, (_strength / 2)] call EFUNC(medical,adjustPainLevel); + }; // create flash to illuminate environment _light = "#lightpoint" createVehicleLocal (getPos _grenade); diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index 803aa0a2200..758e6eb9a0c 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -1,246 +1,246 @@  - + - - - Switch Grenade Mode - Granaten-Modus wechseln - Cambiar modo de granada - Tryb rzutu granatem - Změnit styl hodu granátu - Changer type de lancer de grenade - Сменить режим броска гранаты - Gránátdobás mód váltás - Cambia tipo di granata - Alternar Modo de Granada - - - Normal Throw - Normaler Wurf - Lanzamiento normal - Normalny rzut - Normální - Lancer Normal - Нормальный бросок - Normál dobás - Lancio normale - Arremesso Normal - - - High Throw - Hoher Wurf - Lanzamiento alto - Rzut lobem - Vysoko - Lancer Haut - Высокий бросок - Magas dobás - Lancio verso l'alto - Arremesso Alto - - - Precise Throw - Präziser Wurf - Lanzamiento preciso - Precyzyjny rzut - Přesně - Lancer Précis - Точный бросок - Pontos dobás - Lancio preciso - Arremesso Preciso - - - Roll Grenade - Granate rollen - Rodar granada - Po ziemi - Po zemi - Lancer Roulé - Катить гранату - Gurítás - Fai rotolare la granata - Rolar Granada - - - Drop Grenade - Granate fallenlassen - Soltar granada - Upuść granat - Upustit granát - Lâcher la grenade - Бросить себе под ноги - Ejtés - Lascia la granata - Largar Granada - - - M84 Stun Grenade - M84 Blendgranate - Granada aturdidora M84 - M84 Grenade Incapacitante - Granat hukowy M84 - M84 Omračující granát - M84 светозвуковая граната - M84 Villanógránát - Granata Stordente M84 - M84 granada de atordoamento - - - Also known as flashbang. Causes immediate flash blindness, deafness, tinnitus, and inner ear disturbance. - Verursacht temporäre Blind- und Taubheit. - Produce de manera inmediata ceguera, sordera, tinitus y afecta el oído interior. - Les grenades incapacitantes servent à désorienter ou distraire une menace pendant quelques secondes. - Granat ogłusza, nie zabijając przeciwnika. Detonacja daje efekt oślepiającego błysku i głośnego huku. - Omračující granát je taktická nesmrtící zbraň používaná při záchraně rukojmí a zvládání davu. - XM84 (M84) - граната нелетального действия, и предназначена для отвлечения и временного вывода из строя, либо дезориентации противника. Основное использование нашла при освобождении заложников, захвате преступников и террористов, а также проведении диверсионных миссий. - Eldobás után felrobban és éles hang, valamint fényhatással zavarja össze a környezetében tartózkodókat. - Anche conosciuta come flashbang. Causa accecamento immediato, sensazioni di sposatezza, mancanza d'equilibrio e disturbi al timpano. - Um tipo de granada não-letal destinado a confundir, desorientar e distrair uma potencial ameaça. - - - M127A1 Hand Held Signal (White) - M127A1 Leuchtmittel (Weiß) - M127A1 Světlice (Bílá) - M127A1 Jelzőrakéta (Fehér) - M127A1 Bengala (Bianco) - Flara ręczna sygnałowa M127A1 (biała) - M127A1 Sinalizador (Branco) - M127A1 Фальшфейер (Белый) - Bengala M127A1 (Blanca) - M127A1 Feux à main (Blanc) - - - M127A1 Hand Held Signal (Red) - M127A1 Leuchtmittel (Rot) - M127A1 Světlice (Červená) - M127A1 Jelzőrakéta (Piros) - M127A1 Bengala (Rosso) - Flara ręczna sygnałowa M127A1 (czerwona) - M127A1 Sinalizador (Vermelho) - M127A1 Фальшфейер (Красный) - Bengala M127A1 (Roja) - M127A1 Feux à main (Rouge) - - - M127A1 Hand Held Signal (Green) - M127A1 Leuchtmittel (Grün) - M127A1 Světlice (Zelená) - M127A1 Jelzőrakéta (Zöld) - M127A1 Bengala (Verde) - Flara ręczna sygnałowa M127A1 (zielona) - M127A1 Sinalizador (Verde) - M127A1 Фальшфейер (Зелёный) - Bengala M127A1 (Verde) - M127A1 Feux à main (Vert) - - - M127A1 Hand Held Signal (Yellow) - M127A1 Leuchtmittel (Gelb) - M127A1 Světlice (Žlutá) - M127A1 Jelzőrakéta (Sárga) - M127A1 Bengala (Giallo) - Flara ręczna sygnałowa M127A1 (żółta) - M127A1 Sinalizador (Amarelo) - M127A1 Фальшфейер (Жёлтые) - Bengala M127A1 (Amarilla) - M127A1 Feux à main (Jaune) - - - White Hand Flare - Weiße Leuchtkugel, wird wie eine Granate geworfen. - Světlice (Bílá) - Jelzőrakéta (Fehér) - Bengala (Bianco) - Flara ręczna (biała) - Sinalizador (Branco) - Фальшфейер (Белый) - Bengala (Blanca) - Feux à main (Blanc) - - - Red Hand Flare - Rote Leuchtkugel, wird wie eine Granate geworfen. - Světlice (Červená) - Jelzőrakéta (Piros) - Bengala (Rosso) - Flara ręczna (czerwona) - Sinalizador (Vermelho) - Фальшфейер (Красный) - Bengala (Roja) - Feux à main (Rouge) - - - Green Hand Flare - Grüne Leuchtkugel, wird wie eine Granate geworfen. - Světlice (Zelená) - Jelzőrakéta (Zöld) - Bengala (Verde) - Flara ręczna (zielona) - Sinalizador (Verde) - Фальшфейер (Зелёный) - Bengala (Verde) - Feux à main (Vert) - - - Yellow Hand Flare - Gelbe Leuchtkugel, wird wie eine Granate geworfen. - Světlice Žlutá - Jelzőrakéta (Sárga) - Bengala (Giallo) - Flara ręczna (żółta) - Sinalizador (Amarelo) - Фальшфейер (Жёлтые) - Bengala (Amarilla) - Feux à main (Jaune) - - - M127A1 (White) - M127A1 (Weiß) - M127A1 (Bílá) - M127A1 (Blanc) - M127A1 (Fehér) - M127A1 (Bianco) - M127A1 (biała) - M127A1 (Branco) - M127A1 (Белый) - M127A1 (Blanca) - - - M127A1 (Red) - M127A1 (Rot) - M127A1 (Červená) - M127A1 (Rouge) - M127A1 (Piros) - M127A1 (Rosso) - M127A1 (czerwona) - M127A1 (Vermelho) - M127A1 (Красный) - M127A1 (Roja) - - - M127A1 (Green) - M127A1 (Grün) - M127A1 (Zelená) - M127A1 (Vert) - M127A1 (Zöld) - M127A1 (Verde) - M127A1 (zielona) - M127A1 (Verde) - M127A1 (Зелёный) - M127A1 (Verde) - - - M127A1 (Yellow) - M127A1 (Gelb) - M127A1 (Žlutá) - M127A1 (Jaune) - M127A1 (Sárga) - M127A1 (Giallo) - M127A1 (żółta) - M127A1 (Amarelo) - M127A1 (Жёлтые) - M127A1 (Amarilla) - - - \ No newline at end of file + + + Switch Grenade Mode + Granaten-Modus wechseln + Cambiar modo de granada + Przełącz sposób rzutu granatem + Změnit styl hodu granátu + Changer type de lancer de grenade + Сменить режим броска гранаты + Gránátkezelési mód váltása + Cambia tipo di granata + Alternar Modo de Granada + + + Normal Throw + Normaler Wurf + Lanzamiento normal + Normalny rzut + Normální hod + Lancer Normal + Нормальный бросок + Normál dobás + Lancio normale + Arremesso Normal + + + High Throw + Hoher Wurf + Lanzamiento alto + Wysoki rzut + Vysoký hod + Lancer Haut + Высокий бросок + Magas dobás + Lancio verso l'alto + Arremesso Alto + + + Precise Throw + Präziser Wurf + Lanzamiento preciso + Precyzyjny rzut + Přesný hod + Lancer Précis + Точный бросок + Pontos dobás + Lancio preciso + Arremesso Preciso + + + Roll Grenade + Granate rollen + Rodar granada + Po ziemi + Po zemi + Lancer Roulé + Катить гранату + Gránát gurítása + Fai rotolare la granata + Rolar Granada + + + Drop Grenade + Granate fallenlassen + Soltar granada + Upuść granat + Upustit granát + Lâcher la grenade + Бросить себе под ноги + Gránát ejtése + Lascia la granata + Largar Granada + + + M84 Stun Grenade + M84 Blendgranate + Granada aturdidora M84 + M84 Grenade Incapacitante + Granat hukowy M84 + Omračující granát M84 + M84 светозвуковая граната + M84 Kábítógránát + Granata Stordente M84 + M84 granada de atordoamento + + + Also known as flashbang. Causes immediate flash blindness, deafness, tinnitus, and inner ear disturbance. + Verursacht temporäre Blind- und Taubheit. + Produce de manera inmediata ceguera, sordera, tinitus y afecta el oído interior. + Les grenades incapacitantes servent à désorienter ou distraire une menace pendant quelques secondes. + Znany też jako flashbang. Powoduje natychmiastową tymczasową ślepotę, głuchotę, dzwonienie w uszach i inne zaburzenia ucha wewnętrznego. + Omračující granát je taktická nesmrtící zbraň používaná při záchraně rukojmí a zvládání davu. + XM84 (M84) - граната нелетального действия, и предназначена для отвлечения и временного вывода из строя, либо дезориентации противника. Основное использование нашла при освобождении заложников, захвате преступников и террористов, а также проведении диверсионных миссий. + Villanógránát néven is ismert. Azonnali villanási vakságot, süketséget, fülzúgást, és belső füli zavart okoz. + Anche conosciuta come flashbang. Causa accecamento immediato, sensazioni di sposatezza, mancanza d'equilibrio e disturbi al timpano. + Um tipo de granada não-letal destinado a confundir, desorientar e distrair uma potencial ameaça. + + + M127A1 Hand Held Signal (White) + M127A1 Leuchtmittel (Weiß) + Světlice M127A1 (Bílá) + M127A1 Kézi Jelzőrakéta (Fehér) + M127A1 Bengala (Bianco) + Flara ręczna sygnałowa M127A1 (biała) + M127A1 Sinalizador (Branco) + M127A1 Фальшфейер (Белый) + Bengala M127A1 (Blanca) + M127A1 Feux à main (Blanc) + + + M127A1 Hand Held Signal (Red) + M127A1 Leuchtmittel (Rot) + Světlice M127A1 (Červená) + M127A1 Kézi Jelzőrakéta (Piros) + M127A1 Bengala (Rosso) + Flara ręczna sygnałowa M127A1 (czerwona) + M127A1 Sinalizador (Vermelho) + M127A1 Фальшфейер (Красный) + Bengala M127A1 (Roja) + M127A1 Feux à main (Rouge) + + + M127A1 Hand Held Signal (Green) + M127A1 Leuchtmittel (Grün) + Světlice M127A1 (Zelená) + M127A1 Kézi Jelzőrakéta (Zöld) + M127A1 Bengala (Verde) + Flara ręczna sygnałowa M127A1 (zielona) + M127A1 Sinalizador (Verde) + M127A1 Фальшфейер (Зелёный) + Bengala M127A1 (Verde) + M127A1 Feux à main (Vert) + + + M127A1 Hand Held Signal (Yellow) + M127A1 Leuchtmittel (Gelb) + Světlice M127A1 (Žlutá) + M127A1 Kézi Jelzőrakéta (Sárga) + M127A1 Bengala (Giallo) + Flara ręczna sygnałowa M127A1 (żółta) + M127A1 Sinalizador (Amarelo) + M127A1 Фальшфейер (Жёлтые) + Bengala M127A1 (Amarilla) + M127A1 Feux à main (Jaune) + + + White Hand Flare + Weiße Leuchtkugel, wird wie eine Granate geworfen. + Světlice (Bílá) + Kézi jelzőrakéta, Fehér színű + Bengala (Bianco) + Flara ręczna (biała) + Sinalizador (Branco) + Фальшфейер (Белый) + Bengala (Blanca) + Feux à main (Blanc) + + + Red Hand Flare + Rote Leuchtkugel, wird wie eine Granate geworfen. + Světlice (Červená) + Kézi jelzőrakéta, Piros színű + Bengala (Rosso) + Flara ręczna (czerwona) + Sinalizador (Vermelho) + Фальшфейер (Красный) + Bengala (Roja) + Feux à main (Rouge) + + + Green Hand Flare + Grüne Leuchtkugel, wird wie eine Granate geworfen. + Světlice (Zelená) + Kézi jelzőrakéta, Zöld színű + Bengala (Verde) + Flara ręczna (zielona) + Sinalizador (Verde) + Фальшфейер (Зелёный) + Bengala (Verde) + Feux à main (Vert) + + + Yellow Hand Flare + Gelbe Leuchtkugel, wird wie eine Granate geworfen. + Světlice (Žlutá) + Kézi jelzőrakéta, Sárga színű + Bengala (Giallo) + Flara ręczna (żółta) + Sinalizador (Amarelo) + Фальшфейер (Жёлтые) + Bengala (Amarilla) + Feux à main (Jaune) + + + M127A1 (White) + M127A1 (Weiß) + M127A1 (Bílá) + M127A1 (Blanc) + M127A1 (Fehér) + M127A1 (Bianco) + M127A1 (biała) + M127A1 (Branco) + M127A1 (Белый) + M127A1 (Blanca) + + + M127A1 (Red) + M127A1 (Rot) + M127A1 (Červená) + M127A1 (Rouge) + M127A1 (Piros) + M127A1 (Rosso) + M127A1 (czerwona) + M127A1 (Vermelho) + M127A1 (Красный) + M127A1 (Roja) + + + M127A1 (Green) + M127A1 (Grün) + M127A1 (Zelená) + M127A1 (Vert) + M127A1 (Zöld) + M127A1 (Verde) + M127A1 (zielona) + M127A1 (Verde) + M127A1 (Зелёный) + M127A1 (Verde) + + + M127A1 (Yellow) + M127A1 (Gelb) + M127A1 (Žlutá) + M127A1 (Jaune) + M127A1 (Sárga) + M127A1 (Giallo) + M127A1 (żółta) + M127A1 (Amarelo) + M127A1 (Жёлтые) + M127A1 (Amarilla) + + + diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 6aab92b9bfc..0813d0648e2 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -38,7 +38,7 @@ class ACE_Settings { class GVAR(DisableEarRinging) { value = 0; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Hearing_DisableEarRinging"; }; }; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index c66361801ec..72776b68c69 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -31,7 +31,7 @@ _muzzle = _this select 4; _mode = _this select 5; _ammo = _this select 6; -if (_weapon in ["Throw", "Put"]) exitWith {}; +if (toLower _weapon in ["throw", "put"]) exitWith {}; if (_unit != vehicle _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {}; _silencer = switch (_weapon) do { diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 1aa38848a51..dd51f30e193 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -56,7 +56,7 @@ if (!(missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false])) then { 0.1 fadeSound _volume; 0.1 fadeSpeech _volume; ACE_player setVariable ["tf_globalVolume", _volume]; - if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume] call acre_api_fnc_setGlobalVolume;}; + if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; }; //hintSilent format ["GVAR(currentDeafness), _Volume = %1, %2", GVAR(currentDeafness), _volume]; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 577d0412367..afbdd2f8286 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -1,108 +1,111 @@  - - - - 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 - Załóż stopery - Dát špunty do uší - Беруши надеты - Bouchons mis - Füldugó berakva - Protetores colocados - Indossa i tappi auricolari - - - Earplugs out - Ohrenstöpsel raus - Quitar tapones - Zdejmij 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 zał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 zdję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 - Deaktiviere Ohrfiepen - Desactivar zumbido de oídos - Отключить эффект баротравмы - - + + + 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 + Nincsen 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 + Fülcsengés letiltása + + diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index bcb2d5aa8e3..ea4a971563a 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -50,3 +50,6 @@ addMissionEventHandler ["Draw3D", DFUNC(render)]; GVAR(actionSelected) = false; [] call FUNC(keyUp); }] call EFUNC(common,addEventhandler); + +// disable firing while the interact menu is is is opened +["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventHandler); diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index c15f8d388df..b4a3504cdd2 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -9,6 +9,7 @@ PREP(compileMenuSelfAction); PREP(collectActiveActionTree); PREP(createAction); PREP(findActionNode); +PREP(handlePlayerChanged); PREP(isSubPath); PREP(keyDown); PREP(keyUp); diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index 17900c2f6b2..f87062bf6f4 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -20,7 +20,13 @@ class ACE_Settings { class GVAR(AlwaysUseCursorSelfInteraction) { value = 0; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction"; }; + class GVAR(UseListMenu) { + value = 0; + typeName = "BOOL"; + isClientSettable = 1; + displayName = "$STR_ACE_Interact_Menu_UseListMenu"; + }; }; diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index a0b9b31dd4b..baf8e1c2728 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -38,10 +38,17 @@ _recurseFnc = { _distance = getNumber (_entryCfg >> "distance"); _icon = getText (_entryCfg >> "icon"); _statement = compile (getText (_entryCfg >> "statement")); - _selection = getText (_entryCfg >> "selection"); - if (_selection == "") then { - _selection = [0,0,0]; + + _selection = ""; + if (isArray ( _entryCfg >> "selection" )) then { + _selection = getArray ( _entryCfg >> "selection" ) + } else { + _selection = getText (_entryCfg >> "selection"); + if (_selection == "") then { + _selection = [0,0,0]; + }; }; + _condition = getText (_entryCfg >> "condition"); if (_condition == "") then {_condition = "true"}; diff --git a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf new file mode 100644 index 00000000000..fe25853733c --- /dev/null +++ b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf @@ -0,0 +1,27 @@ +/* + * Author: commy2 + * Disables firing while the menu is opened. Called from playerChanged eh. + * + * Argument: + * 0: New unit to add the addAction eh + * 1: Old unit to remove the addAction eh + * + * Return value: + * None + */ +#include "script_component.hpp" + +EXPLODE_2_PVT(_this,_newUnit,_oldUnit); + +// add to new unit +private "_ehid"; +_ehid = [_newUnit, "DefaultAction", {EGVAR(interact_menu,openedMenuType) >= 0}, {}] call EFUNC(common,addActionEventHandler); + +_newUnit setVariable [QGVAR(AAEHID), _ehid]; + +// remove from old unit +_ehid = _oldUnit getVariable [QGVAR(AAEHID), -1]; + +[_oldUnit, "DefaultAction", _ehid] call EFUNC(common,removeActionEventHandler); + +_oldUnit setVariable [QGVAR(AAEHID), -1]; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 45c0c46a61f..8d4734c8f89 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -14,50 +14,56 @@ GVAR(currentOptions) = []; -private ["_player","_numInteractObjects","_numInteractions","_actionsVarName","_classActions","_objectActions","_target","_player","_action","_actionData","_active"]; +private ["_player","_numInteractObjects","_numInteractions","_actionsVarName","_classActions","_objectActions","_target","_player","_action","_actionData","_active","_cameraPos","_cameraDir"]; _player = ACE_player; - _fnc_renderNearbyActions = { // Render all nearby interaction menus #define MAXINTERACTOBJECTS 3 + _cameraPos = (positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL); + _cameraDir = ((positionCameraToWorld [0, 0, 1]) call EFUNC(common,positionToASL)) vectorDiff _cameraPos; + _numInteractObjects = 0; - _nearestObjects = nearestObjects [ACE_player, ["All"], 15]; + _nearestObjects = nearestObjects [((getPosASL ACE_player) vectorAdd (_cameraDir vectorMultiply 5)) call EFUNC(common,ASLToPosition), ["All"], 8]; { _target = _x; - _numInteractions = 0; - // Prevent interacting with yourself or your own vehicle - if (_target != ACE_player && {_target != vehicle ACE_player}) then { + // Quick oclussion test. Skip objects more than 1 m behind the camera plane + _lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir; + if (_lambda > -1) then { + _numInteractions = 0; + // Prevent interacting with yourself or your own vehicle + if (_target != ACE_player && {_target != vehicle ACE_player}) then { + + // Iterate through object actions, find base level actions and render them if appropiate + _actionsVarName = format [QGVAR(Act_%1), typeOf _target]; + GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; + { + // Only render them directly if they are base level actions + if (count (_x select 1) == 0) then { + // Try to render the menu + _action = _x; + if ([_target, _action] call FUNC(renderBaseMenu)) then { + _numInteractions = _numInteractions + 1; + }; + }; + } forEach GVAR(objectActionList); - // Iterate through object actions, find base level actions and render them if appropiate - _actionsVarName = format [QGVAR(Act_%1), typeOf _target]; - GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; - { - // Only render them directly if they are base level actions - if (count (_x select 1) == 0) then { - // Try to render the menu + // Iterate through base level class actions and render them if appropiate + _classActions = missionNamespace getVariable [_actionsVarName, []]; + { _action = _x; + // Try to render the menu if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; }; - }; - } forEach GVAR(objectActionList); - - // Iterate through base level class actions and render them if appropiate - _classActions = missionNamespace getVariable [_actionsVarName, []]; - { - _action = _x; - // Try to render the menu - if ([_target, _action] call FUNC(renderBaseMenu)) then { - _numInteractions = _numInteractions + 1; - }; - } forEach _classActions; + } forEach _classActions; - // Limit the amount of objects the player can interact with - if (_numInteractions > 0) then { - _numInteractObjects = _numInteractObjects + 1; + // Limit the amount of objects the player can interact with + if (_numInteractions > 0) then { + _numInteractObjects = _numInteractObjects + 1; + }; }; }; if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 1cfc13923e9..3da1777bedd 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -35,8 +35,18 @@ GVAR(iconCount) = GVAR(iconCount) + 1; if(_icon == "") then { _icon = DEFAULT_ICON; }; -_text = format ["
%4", _icon, _color, _color, _text]; + +_text = if (GVAR(UseListMenu)) then { + format ["%4", _icon, _color, _color, _text] +} else { + format ["
%4", _icon, _color, _color, "ace_breakLine" callExtension _text]; +}; + _ctrl ctrlSetStructuredText (parseText _text); -_ctrl ctrlSetPosition [(_sPos select 0)-(0.125*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.25*SafeZoneW, 0.1*SafeZoneW]; -//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1]; +_text = if (GVAR(UseListMenu)) then { + _ctrl ctrlSetPosition [(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW]; +} else { + _ctrl ctrlSetPosition [(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW]; +}; +//_ctrl ctrlSetBackgroundColor [0, 1, 0, 0.1]; _ctrl ctrlCommit 0; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 42e8de16a25..b46740921e5 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -92,7 +92,12 @@ if (_numChildren == 1) then { }; // Scale menu based on the amount of children -_scale = 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5); +_scale = if (GVAR(UseListMenu)) then { + 0.17 +} else { + 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5) +}; + // Animate menu scale if (_menuInSelectedPath && (_menuDepth == count _path)) then { _scale = _scale * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1)); @@ -106,8 +111,13 @@ _angle = _centerAngle - _angleSpan / 2; { //BEGIN_COUNTER(children); private ["_offset","_newPos"]; - _newPos = [(_sPos select 0) -_scale * cos _angle, - (_sPos select 1) +_scale * (sin _angle) * 4/3]; + _newPos = if (GVAR(UseListMenu)) then { + [(_sPos select 0) + _scale * 1.10, + (_sPos select 1) + _scale * 0.30 * 4/3 * (_foreachindex - _numChildren/2 + 0.5)]; + } else { + [(_sPos select 0) -_scale * cos _angle, + (_sPos select 1) +_scale * (sin _angle) * 4/3]; + }; //drawLine3D [_pos, _newPos, [1,0,0,0.8]]; //END_COUNTER(children); diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index 44ed15e9c42..5afcf63cc6b 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -24,7 +24,12 @@ private "_ctrl"; _ctrl = GVAR(iconCtrls) select GVAR(iconCount); GVAR(iconCount) = GVAR(iconCount) + 1; -_ctrl ctrlSetStructuredText (parseText format ["", _icon]); -_ctrl ctrlSetPosition [(_sPos select 0)-(0.05*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW]; +if (GVAR(UseListMenu)) then { + _ctrl ctrlSetStructuredText (parseText format ["", _icon]); + _ctrl ctrlSetPosition [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW]; +} else { + _ctrl ctrlSetStructuredText (parseText format ["", _icon]); + _ctrl ctrlSetPosition [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW]; +}; //_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1]; _ctrl ctrlCommit 0; diff --git a/addons/interact_menu/script_component.hpp b/addons/interact_menu/script_component.hpp index 958d1c802d5..a086b02613c 100644 --- a/addons/interact_menu/script_component.hpp +++ b/addons/interact_menu/script_component.hpp @@ -9,4 +9,6 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACT_MENU #endif -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\addons\main\script_macros.hpp" + +#define ENABLE_PERFORMANCE_COUNTERS diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index f039dcd8064..eb03f863555 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -1,35 +1,59 @@  - - - Always display cursor for self interaction - Immer den Cursor für Selbst-Interaktionen anzeigen. - Mostrar siempre el cursor para la interacción propia - Всегда показывать курсор для взаимодействия с собой - - - Interact Key - Fremdinteraktionsmenü-Taste - Tecla de interacción - Клавиша взаимодействия - - - Self Interaction Key - Eigeninteraktionsmenü-Taste - Tecla de interacción propia - Клавиша взаимодействия (с собой) - - - Self Actions - Selbst-Aktionen - Acciones propias - Действия с собой - - - Vehicle Actions - Fahrzeug-Aktionen - Acciones de vehículo - Действия на транспорте - - + + + 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 + Mindig legyen a saját cselekvés kurzorja látható + + + Display interaction menus as lists + Mostrar los menus de interacción como listas + + + Interact Key + Fremdinteraktionsmenü-Taste + Tecla de interacción + Клавиша взаимодействия + Klávesa pro interakci + Klawisz interakcji + Touche d'interaction + Cselekvő gomb + + + Self Interaction Key + Eigeninteraktionsmenü-Taste + Tecla de interacción propia + Клавиша взаимодействия (с собой) + Klávesa pro vlastní interakci + Klawisz własnej interakcji + Touche d'interaction personnelle + Saját cselekvő gomb + + + Self Actions + Selbst-Aktionen + Acciones propias + Действия с собой + Vlastní akce + Własne akcje + Interaction personnelle + Saját cselekvések + + + Vehicle Actions + Fahrzeug-Aktionen + Acciones de vehículo + Действия на транспорте + Interakce s vozidly + Akcje pojazdu + Interaction véhicule + Járműves cselekvések + + diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index 17200056b86..7b003bbe8cf 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -1,27 +1,11 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) ); - }; -}; - -class Extended_GetIn_EventHandlers { - class All { - class ADDONnu { - clientGetIn = QUOTE( if (_this select 2 == ACE_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}); + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); }; - }; }; -class Extended_GetOut_EventHandlers { - class All { - class ADDONnu { - clientGetOut = QUOTE( if (_this select 2 == ACE_player && {!isNull (findDisplay 1713999)}) then {(findDisplay 1713999) closeDisplay 1}); +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; - }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index e85300f3014..bd36f427035 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -260,12 +260,11 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_white_ca.paa); hotkey = "N"; }; - class ACE_BecomeLeader { displayName = "$STR_ACE_Interaction_BecomeLeader"; - condition = QUOTE(count (units group _player) > 1 && {leader group _player != _player}); + condition = QUOTE(_this call FUNC(canBecomeLeader)); exceptions[] = {"isNotInside"}; - statement = QUOTE(_newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player;); + statement = QUOTE(_this call FUNC(doBecomeLeader)); showDisabled = 1; priority = 1.0; icon = PATHTOF(UI\team\team_white_ca.paa); diff --git a/addons/interaction/XEH_clientInit.sqf b/addons/interaction/XEH_postInit.sqf similarity index 91% rename from addons/interaction/XEH_clientInit.sqf rename to addons/interaction/XEH_postInit.sqf index 1ed3883f02d..98b1cc15235 100644 --- a/addons/interaction/XEH_clientInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -4,6 +4,12 @@ ACE_Modifier = 0; +//SelectLeader Event Handler for BecomeLeader action: +[QGVAR(selectLeader), { + PARAMS_2(_group,_leader); + _group selectLeader _leader; +}] call EFUNC(common,addEventHandler); + if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index 671535c36d0..6f10a4e8348 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -6,8 +6,10 @@ PREP(addPassengerActions); PREP(addPassengersActions); PREP(addSelectableItem); PREP(applyButtons); +PREP(canBecomeLeader); PREP(canInteractWithCivilian); PREP(canTapShoulder); +PREP(doBecomeLeader); PREP(getDoor); PREP(getDoorAnimations); PREP(getDown); diff --git a/addons/interaction/functions/fnc_canBecomeLeader.sqf b/addons/interaction/functions/fnc_canBecomeLeader.sqf new file mode 100644 index 00000000000..11234ad6d75 --- /dev/null +++ b/addons/interaction/functions/fnc_canBecomeLeader.sqf @@ -0,0 +1,21 @@ +/* + * Author: PabstMirror + * Test if can Become Leader of group + * + * Arguments: + * 0: target + * 1: player + * + * Return Value: + * + * + * Example: + * [player, player] call ace_interaction_fnc_canBecomeLeader + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_target,_player); + +(count (units group _player) > 1) && {leader group _player != _player} diff --git a/addons/interaction/functions/fnc_doBecomeLeader.sqf b/addons/interaction/functions/fnc_doBecomeLeader.sqf new file mode 100644 index 00000000000..24bfa66c118 --- /dev/null +++ b/addons/interaction/functions/fnc_doBecomeLeader.sqf @@ -0,0 +1,21 @@ + /* + * Author: PabstMirror + * Become Leader of group + * + * Arguments: + * 0: target + * 1: player + * + * Return Value: + * None + * + * Example: + * [player, player] call ace_interaction_fnc_doBecomeLeader + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_target,_player); + +[QGVAR(selectLeader), (units group _player), [(group _player), _player]] call EFUNC(common,targetEvent); diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index e1837865ae7..680c0409c18 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1,678 +1,723 @@  - - - Interactions - Interaktionen - Interacciones - - - Torso - Torso - Torso - - - Head - Kopf - Cabeza - - - Left Arm - Linker Arm - Brazo izquierdo - - - Right Arm - Rechter Arm - Brazo derecho - - - Left Leg - Linkes Bein - Pierna izquierda - - - Right Leg - Rechtes Bein - Pierna derecha - - - Weapon - Waffe - Arma - - - 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 (na siebie) - 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ę - Odejít ze skupiny - 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 - Gesta - 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 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 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 Týmu %1 - Вы присоединились к группе %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 - Interagiere - Interakce - Взаимодействовать - Interakcja - Interactuar - - - Passengers - Fahrzeuginsassen - Pasajeros - Пассажиры - - + + + Interactions + Interaktionen + Interacciones + Interakce + Interakcje + Interactions + Взаимодействия + Cselekvések + + + Torso + Torse + Torso + Torso + Trup + Tors + Торс + Testtörzs + + + Head + Tête + Kopf + Cabeza + Hlava + Głowa + Голова + Fej + + + Left Arm + Linker Arm + Brazo izquierdo + Levá paže + Lewe ramię + Левая рука + Bal kar + + + Right Arm + Rechter Arm + Brazo derecho + Pravá paže + Prawe ramię + Bras droit + Правая рука + Jobb kar + + + Left Leg + Linkes Bein + Pierna izquierda + Levá noha + Lewa noga + Jambe gauche + Левая нога + Bal láb + + + Right Leg + Rechtes Bein + Pierna derecha + Pravá hona + Prawa noga + Jambe droite + Правая нога + Jobb láb + + + Weapon + Arme + Waffe + Arma + Zbraň + Broń + Оружие + Fegyver + + + Interaction Menu + Interaktionsmenü + Menú de interacción + Menu interakcji + Menu interakce + Menu d'interaction + Меню взаимодействия + Cselekvő menü + 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) + Меню взаимодействия (с собой) + Cselekvő menü (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ása / zárása + 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 a csoporthoz + 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 + Привет + Helló + 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 + Megveregették a JOBB válladat. + 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 + Megveregették a BAL válladat. + 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ése + + + 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 + Interakce + Взаимодействовать + Interakcja + Interactuar + Cselekvés + + + Passengers + Fahrzeuginsassen + Pasajeros + Пассажиры + Pasažéři + Pasażerowie + Passagers + Utasok + + diff --git a/addons/inventory/config.cpp b/addons/inventory/config.cpp index c7b6649be64..1268f8b8868 100644 --- a/addons/inventory/config.cpp +++ b/addons/inventory/config.cpp @@ -18,7 +18,7 @@ class ACE_Settings { class GVAR(inventoryDisplaySize) { value = 0; typeName = "SCALAR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Inventory_SettingName"; description = "$STR_ACE_Inventory_SettingDescription"; values[] = {"Normal (Default Size)", "Medium", "Bigger"}; diff --git a/addons/inventory/stringtable.xml b/addons/inventory/stringtable.xml index 3c3e1dff24f..e3fa7f6491a 100644 --- a/addons/inventory/stringtable.xml +++ b/addons/inventory/stringtable.xml @@ -1,17 +1,25 @@  - - - Make Inventory Display Bigger - Erhöhe die angezeigte Inventargröße - Hacer la pantalla de inventario mas grande - Сделать окно инвентаря больше - - - 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. - Обычно, окно инвентаря зависит от размеров пользовательского интерфейса. Эта настройка позволяет увеличить размер окна инвентаря в пользовательском интерфейсе, не увеличивая размера шрифтов, так что отображется большее количество строк. - - + + + 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 + Legyen a felszerelés menüje nagyobb + + + 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 + Alaphelyzetben a kezelőfelület mérete skálázza a felszerelési menüt. Ez az opció engedélyezi a menü felskálázását, de megtartja a betűméreteket, így növelve a láthatóságot. + + diff --git a/addons/javelin/CfgWeapons.hpp b/addons/javelin/CfgWeapons.hpp index eccdd306232..cef967e32e3 100644 --- a/addons/javelin/CfgWeapons.hpp +++ b/addons/javelin/CfgWeapons.hpp @@ -6,7 +6,8 @@ class CfgWeapons { class launch_Titan_base : Launcher_Base_F { weaponInfoType = "ACE_RscOptics_javelin"; - + modelOptics = PATHTOF(data\reticle_titan.p3d); + lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp index e208e188346..8b33c95c017 100644 --- a/addons/javelin/RscInGameUI.hpp +++ b/addons/javelin/RscInGameUI.hpp @@ -12,19 +12,9 @@ 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];"; - - class CA_Distance: RscOpticsValue { - idc = 151; - sizeEx = "0"; - colorText[] = {0,0,0,0}; - x = 0; - y = 0; - w = 0; - h = 0; - }; + onUnload = "uiNameSpace setVariable ['ACE_RscOptics_javelin',nil];uiNameSpace setVariable ['ACE_RscOptics_javelin_PFH',nil];"; class ACE_javelin_elements_group: RscControlsGroup { @@ -45,13 +35,16 @@ class RscInGameUI { height = 0.001; }; class Controls { - class JavelinLocking : RscMapControl { - onDraw = QUOTE(_this call FUNC(onOpticDraw)); - idc = -1; + 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"; @@ -65,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"; @@ -88,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"; @@ -137,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"; @@ -163,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"; @@ -212,7 +191,7 @@ class RscInGameUI { h = "0.1895*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; - */ + }; }; diff --git a/addons/javelin/XEH_clientInit.sqf b/addons/javelin/XEH_clientInit.sqf index 1d3b546e396..38b006ca244 100644 --- a/addons/javelin/XEH_clientInit.sqf +++ b/addons/javelin/XEH_clientInit.sqf @@ -1,3 +1,5 @@ #include "script_component.hpp" +if (!hasInterface) exitWith {}; + #include "initKeybinds.sqf" \ No newline at end of file diff --git a/addons/javelin/data/reticle_titan.p3d b/addons/javelin/data/reticle_titan.p3d new file mode 100644 index 00000000000..682296f0c82 Binary files /dev/null and b/addons/javelin/data/reticle_titan.p3d differ diff --git a/addons/javelin/functions/fnc_cycleFireMode.sqf b/addons/javelin/functions/fnc_cycleFireMode.sqf index 4fed8e05cc2..2245bb71e5d 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 a319c61de5d..85877f1f161 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -1,16 +1,27 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -//TRACE_1("enter", _this); +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 -private["_args", "_lastTick", "_runTime", "_soundTime", "_lockTime", "_newTarget", "_currentTarget", "_range", "_pos", "_targetArray"]; +private["_isJavelin", "_args", "_lastTick", "_runTime", "_soundTime", "_lockTime", "_newTarget", "_currentTarget", "_range", "_pos", "_targetArray"]; + +if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom)) + || { (vehicle ACE_player) != ACE_player } + ) exitWith { + __JavelinIGUITargeting ctrlShow false; + __JavelinIGUITargetingGate ctrlShow false; + __JavelinIGUITargetingLines ctrlShow false; + __JavelinIGUITargetingConstraints ctrlShow false; + + [(_this select 1)] call cba_fnc_removePerFrameHandler; + uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; +}; // Reset arguments if we havnt rendered in over a second _args = uiNamespace getVariable[QGVAR(arguments), [] ]; @@ -21,11 +32,14 @@ if( (count _args) > 0) then { }; }; +TRACE_1("Running", "Running"); + // Pull the arguments _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; @@ -37,14 +51,17 @@ if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} && // Refresh the firemode [] call FUNC(showFireMode); - -// Only start locking on holding tab -if(!GVAR(isLockKeyDown)) exitWith { false }; + + +// 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; }; @@ -66,24 +83,50 @@ _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 > 7} - // && { (currentVisionMode ACE_player == 2)} + && {(call CBA_fnc_getFoV) select 1 > 9} + && { (currentVisionMode ACE_player == 2)} + && GVAR(isLockKeyDown) ) then { // Lock on after 3 seconds if(_currentTarget != _newTarget) then { @@ -93,35 +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 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"]; @@ -147,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; @@ -154,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]; @@ -171,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]; @@ -182,21 +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; - + _lockTime = 0; + __JavelinIGUISeek ctrlSetTextColor __ColorGray; - __JavelinIGUINFOV ctrlSetTextColor __ColorGray; - __JavelinIGUITargetingConstrains ctrlShow false; + __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 49e9a25e61a..d38e1c33051 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,6 +24,15 @@ uiNameSpace setVariable [QGVAR(arguments), objNull, // currentTargetObject 0, // Run Time 0, // Lock Time - 0 // Sound timer + 0, // Sound timer + (random __LOCKONTIMERANDOM) // random lock time addition ] -]; \ No newline at end of file +]; + + + +_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; +if(isNil "_pfh_handle") then { + _pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; + uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle]; +}; \ No newline at end of file diff --git a/addons/javelin/initKeybinds.sqf b/addons/javelin/initKeybinds.sqf index 6634b1f6236..ecce40bbf04 100644 --- a/addons/javelin/initKeybinds.sqf +++ b/addons/javelin/initKeybinds.sqf @@ -27,4 +27,4 @@ [ACE_player] call FUNC(cycleFireMode); false }, -[15, [false, true, false]], false] call cba_fnc_addKeybind; //Shift+Tab Key \ No newline at end of file +[15, [false, true, false]], false] call cba_fnc_addKeybind; //Ctrl+Tab Key \ No newline at end of file diff --git a/addons/javelin/script_component.hpp b/addons/javelin/script_component.hpp index 6aa34b6bc87..7234a1e3d4b 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 3859fccf2b1..f41adba0e3a 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -1,15 +1,23 @@ - - - - - Lock Target (Hold) - Ziel aufschalten - Захватить цель (удерживать) - - - Cycle Fire Mode - Wechsle Feuermodus - Переключение режимов огня - - - + + + + + Lock Target (Hold) + Ziel aufschalten + Захватить цель (удерживать) + Zamknout cíl(držet) + Namierz cel (przytrzymaj) + Verrouiller cible (maintenir) + Célpontra állás (Lenyomva tartott) + + + Cycle Fire Mode + Wechsle Feuermodus + Переключение режимов огня + Cyklování režimů palby + Przełącz tryb ognia + Cycle mode de tir + Tüzelési mód váltása + + + diff --git a/addons/kestrel/$PBOPREFIX$ b/addons/kestrel/$PBOPREFIX$ deleted file mode 100644 index ca3fac2e963..00000000000 --- 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 f0a9f14d914..00000000000 --- 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 31aea38bda5..00000000000 --- 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 f5b91783c10..00000000000 --- 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 2530dbcda7c..00000000000 --- 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 09d9b1a0ef2..00000000000 --- 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 bece90dd8da..00000000000 --- 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 fd72433b9e9..00000000000 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 9a29b346fb0..00000000000 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 992743a3a6c..00000000000 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 bec55bb418f..00000000000 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 190c25f1002..00000000000 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 fe757888e42..00000000000 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 1b0fda0a654..00000000000 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 659f4597a30..00000000000 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 abb1ed65806..00000000000 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 800ed80d8b2..00000000000 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 784e441c218..00000000000 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 9452286c2d6..00000000000 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 31fe71ce84c..00000000000 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 978506ef5d4..00000000000 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 cfec327da65..00000000000 --- 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 cdfc325698f..00000000000 --- 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 25ec9eba679..00000000000 --- 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 528b26affc0..00000000000 --- 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 43cb6ce9d56..00000000000 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 7b2b62ccf59..00000000000 Binary files a/addons/kestrel/kestrel4500rad.p3d and /dev/null differ diff --git a/addons/kestrel/stringtable.xml b/addons/kestrel/stringtable.xml deleted file mode 100644 index baae1188916..00000000000 --- a/addons/kestrel/stringtable.xml +++ /dev/null @@ -1,64 +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 - - - \ No newline at end of file diff --git a/addons/kestrel/ui/WindLight-02.paa b/addons/kestrel/ui/WindLight-02.paa deleted file mode 100644 index a02147e6eeb..00000000000 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 340cfdcd6e6..00000000000 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 6d8404fb86c..00000000000 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 c5e0a40af76..00000000000 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 4df57f75850..00000000000 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 8c5012502fc..00000000000 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 15173a56abc..00000000000 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 83c860cecb7..00000000000 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 87a8dfcca99..00000000000 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 f9200aaf2d0..00000000000 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 e3ee52d21e4..00000000000 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 9b835e62c4a..00000000000 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 fd4d255c35f..00000000000 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 db6e8dcebcd..00000000000 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 300934ff371..00000000000 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 f7b8331daea..00000000000 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 a3b0a532ff8..00000000000 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 495ec6bc154..00000000000 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 d0471a4c4fd..00000000000 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 967e9d8ef7e..00000000000 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 54ef3eabf9e..00000000000 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 e7608c2e022..00000000000 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 6d1ce9418e9..00000000000 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 2b853dca899..00000000000 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 56443ab4f90..00000000000 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 06cb4610fb2..00000000000 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 5f548b6ac93..00000000000 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 617e83193d5..00000000000 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 87c2db663c7..00000000000 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 8d294836352..00000000000 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 fc08f14e1bf..00000000000 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 3fbbd703028..00000000000 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 2254b0d545a..00000000000 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 6054696d61c..00000000000 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 d62308dfc93..00000000000 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 cce04ab0999..00000000000 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 e2c53aec6f7..00000000000 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 609b54096a4..00000000000 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 705cc5bd10c..00000000000 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 d8d585d6ebf..00000000000 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 d903c832abd..00000000000 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 91153a801b0..00000000000 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 d0a34d79e45..00000000000 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 1be25039e43..00000000000 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 561e52ec886..00000000000 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 fbce91664a9..00000000000 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 f8e30a0c645..00000000000 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 b956cb478b9..00000000000 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 090f630d8fc..00000000000 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 d8b8b7eff18..00000000000 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 241980a1e07..00000000000 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 0e77f697e2d..00000000000 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 ad283a4d76d..00000000000 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 b7ae70a9894..00000000000 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 8fa262c2863..00000000000 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 00000000000..2a05b722985 --- /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 00000000000..957863bc9d8 --- /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 00000000000..20d8bf5b62a --- /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 6db0e4b7d4f..881edca202b 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 00000000000..36a324beb9a --- /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 00000000000..defb954292f --- /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 00000000000..4fafe55cb2e 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 00000000000..6ff961c6658 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 00000000000..7b24fe2da82 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 00000000000..199a37afba3 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 00000000000..9540042ff36 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 00000000000..d336be67f19 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 00000000000..8cb8dabbdc0 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 00000000000..649dbb1b63a 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 00000000000..062282115a1 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 00000000000..461ed533db5 --- /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 00000000000..d081f485ec2 --- /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 00000000000..8e558af44f4 --- /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 00000000000..dfaa44723e5 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 00000000000..f0f9a10db1a --- /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 00000000000..8267f7f7298 --- /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 00000000000..0c9e29f9bc3 --- /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 00000000000..8ebd4e01d20 --- /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 00000000000..f9cd6cf04a3 --- /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 00000000000..2c1241bb6c9 --- /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 00000000000..e7679df53f9 --- /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 00000000000..eb718906aa4 --- /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 00000000000..0f8be4f873a --- /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 00000000000..075ed800808 --- /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 00000000000..32c774cd890 --- /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 00000000000..585856cbbbd --- /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}, +[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) + +["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}, +[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) diff --git a/addons/kestrel4500/kestrel4500.p3d b/addons/kestrel4500/kestrel4500.p3d new file mode 100644 index 00000000000..bb4edd27062 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 00000000000..b8db2edb789 --- /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 00000000000..1f5a2ddeb12 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 00000000000..ce34a645c3b 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 00000000000..1f5a2ddeb12 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 00000000000..a880e76dc1a 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 00000000000..14ff2e06895 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 00000000000..e4ef1df50d9 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 00000000000..e9a72d82a81 --- /dev/null +++ b/addons/kestrel4500/stringtable.xml @@ -0,0 +1,43 @@ + + + + + + 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 + Kestrel 4500 elővétele + + + 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 + + + diff --git a/addons/laser/CfgVehicles.hpp b/addons/laser/CfgVehicles.hpp index 07b8055f0e0..f4e2ed42ab2 100644 --- a/addons/laser/CfgVehicles.hpp +++ b/addons/laser/CfgVehicles.hpp @@ -2,8 +2,32 @@ class CfgVehicles { class All; class LaserTarget: All { + // @TODO: Changing the model and simulation hides it, but THEN IT DOESNT SPAWN WTF!? + model = "\A3\Weapons_F\empty.p3d"; + simulation = "nvmarker"; + nvTarget = 1; + //simulation = "laserTarget"; + //threat[] = {0,0,0}; class EventHandlers { init = QUOTE(_this call FUNC(laser_init)); }; + + diffuse[] = {0,0,0}; + ambient[] = {0,0,0}; + brightness = 0; + name = "pozicni blik"; + drawLight = 0; + drawLightSize = 0; + drawLightCenterSize = 0; + activeLight = 0; + blinking = 0; + dayLight = 0; + onlyInNvg = 0; + useFlare = 0; + }; + + // Visual laserTarget override + class ACE_LaserTarget_Visual : LaserTarget { + //model = "\A3\Weapons_f\laserTgt.p3d"; }; }; \ No newline at end of file diff --git a/addons/laser/CfgWeapons.hpp b/addons/laser/CfgWeapons.hpp new file mode 100644 index 00000000000..70a25e6f85d --- /dev/null +++ b/addons/laser/CfgWeapons.hpp @@ -0,0 +1,8 @@ + +class CfgWeapons { + class Binocular; + + class Laserdesignator : Binocular { + visionMode[] = {"Normal","NVG"}; + }; +}; diff --git a/addons/laser/RscInGameUI.hpp b/addons/laser/RscInGameUI.hpp new file mode 100644 index 00000000000..457d3205202 --- /dev/null +++ b/addons/laser/RscInGameUI.hpp @@ -0,0 +1 @@ +// TODO: RscOptics_LaserDesignator for laser code designation \ No newline at end of file diff --git a/addons/laser/XEH_post_init.sqf b/addons/laser/XEH_post_init.sqf index 6904ee6c47e..fb189d5041a 100644 --- a/addons/laser/XEH_post_init.sqf +++ b/addons/laser/XEH_post_init.sqf @@ -1,3 +1,4 @@ #include "script_component.hpp" -NO_DEDICATED; +["laser_laserOn", {_this call DFUNC(handleLaserOn)}] call EFUNC(common,addEventHandler); +["laser_laserOff", {_this call DFUNC(handleLaserOff)}] call EFUNC(common,addEventHandler); diff --git a/addons/laser/XEH_pre_init.sqf b/addons/laser/XEH_pre_init.sqf index 4e4a39e8bf2..e160a533f2a 100644 --- a/addons/laser/XEH_pre_init.sqf +++ b/addons/laser/XEH_pre_init.sqf @@ -6,15 +6,28 @@ PREP(shootRay); PREP(shootCone); PREP(checkLos); -PREP(findLaserDesignator); PREP(findStrongestRay); PREP(translateToModelSpace); PREP(translateToWeaponSpace); -PREP(laser_init); +PREP(seekerFindLaserSpot); +PREP(laserOn); +PREP(laserOff); +PREP(handleLaserOn); +PREP(handleLaserOff); + +PREP(drawVisibleLaserTargets); +PREP(laser_init); +PREP(vanillaLaserSeekerHandler); PREP(laserTargetPFH); -ACE_LASERS = []; -ACE_DEFAULT_LASER_CODE = 1001; \ No newline at end of file +GVAR(VanillaLasers) = []; + +// Laser default variables +ACE_DEFAULT_LASER_CODE = 1001; +ACE_DEFAULT_LASER_WAVELENGTH = 1550; +ACE_DEFAULT_LASER_BEAMSPREAD = 1; + +GVAR(laserEmitters) = HASH_CREATE; \ No newline at end of file diff --git a/addons/laser/config.cpp b/addons/laser/config.cpp index 4b209b866e2..3f430619ef5 100644 --- a/addons/laser/config.cpp +++ b/addons/laser/config.cpp @@ -11,4 +11,5 @@ class CfgPatches { }; #include "CfgEventhandlers.hpp" -#include "CfgVehicles.hpp" \ No newline at end of file +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" \ No newline at end of file diff --git a/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf new file mode 100644 index 00000000000..161364c0f2e --- /dev/null +++ b/addons/laser/functions/fnc_drawVisibleLaserTargets.sqf @@ -0,0 +1 @@ +// @TODO: This is to draw the actual LaserTarget positions to utilize for laser shooting. \ No newline at end of file diff --git a/addons/laser/functions/fnc_findLaserDesignator.sqf b/addons/laser/functions/fnc_findLaserDesignator.sqf deleted file mode 100644 index 902775ebd5e..00000000000 --- a/addons/laser/functions/fnc_findLaserDesignator.sqf +++ /dev/null @@ -1,74 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -private ["_seeker", "_headingPitch", "_found", "_vectorTo", "_polarTo", "_dir", "_vertOk", "_horzOk", "_fov", - "_closestDistance", "_pos1", "_pos2", "_disCheck", "_currentTarget", "_potentialTargets", "_offset", "_vector"]; - -_seeker = _this select 0; -_laserCode = _this select 1; -_fov = if (count _this > 2) then {_this select 2} else {75}; -_vector = if (count _this > 3) then {_this select 3} else {vectorDir _seeker}; -_offset = if (count _this > 4) then {_this select 4} else {[0,0,0]}; - -_headingPitch = _vector call CBA_fnc_vect2polar; -_currentTarget = nil; -_found = false; - -_getPosASL = {visiblePositionASL (_this select 0)}; - -LOG("Searching lasers"); -if(!(isNil "ACE_LASERS")) then { - _potentialTargets = []; - TRACE_1("", ACE_LASERS); - - { - if(!(isNull _x)) then { - _sensorPos = ATLtoASL(_seeker modelToWorldVisual _offset); - _vectorTo = [_sensorPos, ([_x] call _getPosASL)] call BIS_fnc_vectorFromXToY; - _polarTo = _vectorTo call CBA_fnc_vect2polar; - _dir = _polarTo select 1; - _dir = _dir - (_headingPitch select 1); - - TRACE_4("Calc", _sensorPos, _vectorTo, _polarTo, _dir); - - if (_dir < 0) then {_dir = _dir + 360}; - if (_dir > 360) then {_dir = _dir - 360}; - _vertOk = false; - _horzOk = false; - if(_dir < _fov || {_dir > (360-_fov)}) then { - _horzOk = true; - }; - if(abs((abs(_polarTo select 2))-(abs(_headingPitch select 2))) < _fov) then { - _vertOk = true; - }; - - TRACE_2("Results", _vertOk, _horzOk); - - if(_vertOk && {_horzOk}) then { - // Does the laser currently have our current code, if we have one? - _targetCode = _x getVariable ["ACE_LASER_CODE", ACE_DEFAULT_LASER_CODE]; - TRACE_1("Target in sight, checking code", _targetCode, _laserCode); - if(_targetCode == _laserCode) then { - _potentialTargets set[(count _potentialTargets), _x]; - }; - }; - }; - - } forEach ACE_LASERS; - - TRACE_1("", _potentialTargets); - - _closestDistance = 100000; - { - _pos1 = (getPosASL _seeker); - _pos2 = ([_x] call _getPosASL); - _disCheck = _pos1 distance _pos2; - // shouldn't this bail out when a valid target is found instead of iterating over all potential targets ? - if(_disCheck < _closestDistance && {[_pos1, _pos2, _x, _seeker] call FUNC(checkLos)}) then { - _found = true; - _currentTarget = _x; - _closestDistance = _disCheck; - }; - } forEach _potentialTargets; -}; -[_found, _currentTarget] \ No newline at end of file diff --git a/addons/laser/functions/fnc_handleLaserOff.sqf b/addons/laser/functions/fnc_handleLaserOff.sqf new file mode 100644 index 00000000000..573bd8197b8 --- /dev/null +++ b/addons/laser/functions/fnc_handleLaserOff.sqf @@ -0,0 +1,8 @@ +//fnc_handleLaserOff.sqf +#include "script_component.hpp" + +private ["_uuid"]; +_uuid = _this select 0; +if(HASH_HASKEY(GVAR(laserEmitters), _uuid)) then { + HASH_REM(GVAR(laserEmitters), _uuid); +}; diff --git a/addons/laser/functions/fnc_handleLaserOn.sqf b/addons/laser/functions/fnc_handleLaserOn.sqf new file mode 100644 index 00000000000..bac53a89575 --- /dev/null +++ b/addons/laser/functions/fnc_handleLaserOn.sqf @@ -0,0 +1,7 @@ +//fnc_handleLaserOn.sqf +#include "script_component.hpp" + +private ["_uuid", "_args"]; +_uuid = _this select 0; +_args = _this select 1; +HASH_SET(GVAR(laserEmitters), _uuid, _args); diff --git a/addons/laser/functions/fnc_laserOff.sqf b/addons/laser/functions/fnc_laserOff.sqf new file mode 100644 index 00000000000..84613cd9887 --- /dev/null +++ b/addons/laser/functions/fnc_laserOff.sqf @@ -0,0 +1,16 @@ +/* + * Author: Nou + * Turn a laser designator off. + * + * Arguments: + * 0: UUID (from laserOn) + * + * Return value: + * None + */ + +#include "script_component.hpp" + +private ["_uuid"]; +_uuid = _this select 0; +["laser_laserOff", [_uuid]] call EFUNC(common,globalEvent); diff --git a/addons/laser/functions/fnc_laserOn.sqf b/addons/laser/functions/fnc_laserOn.sqf new file mode 100644 index 00000000000..9b5faa38598 --- /dev/null +++ b/addons/laser/functions/fnc_laserOn.sqf @@ -0,0 +1,23 @@ +/* + * Author: Nou + * Turn a laser designator on. + * + * Arguments: + * 0: Emitter + * 1: Owner + * 2: Method, can be code, which emitter and owner are passed to, a string function name, an array with a position memory point and weapon name, or an array with a position memory point, a vector begining memory point, and vector ending memory point. + * 3: Wavelength (1550nm is common eye safe) + * 4: Laser code + * 5: Beam divergence (in mils off beam center). + * + * Return value: + * String, UUID for sending to laserOff function. + */ + +#include "script_component.hpp" + +private ["_uuid", "_args"]; +_uuid = format["%1%2%3", floor diag_tickTime, floor random 1000, floor random 10000]; +_args = [_uuid, _this]; +["laser_laserOn", _args] call EFUNC(common,globalEvent); +_uuid; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index bdab413685e..d73d9f070a8 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -1,20 +1,25 @@ +//#define DEBUG_MODE_FULL #include "script_component.hpp" +TRACE_1("enter", _this); private["_args", "_laserTarget"]; //TRACE_1("enter", _this); _args = _this select 0; _laserTarget = _args select 0; +_shooter = _args select 1; +_uuid = _args select 2; -if(isNull _laserTarget || !alive player) exitWith { +if(isNull _laserTarget || !alive _shooter) exitWith { [(_this select 1)] call cba_fnc_removePerFrameHandler; - REM(ACE_LASERS, _laserTarget); + REM(GVAR(VanillaLasers), _laserTarget); + + // Remove laseron + [_uuid] call FUNC(laserOff); }; -_end = diag_tickTime; - #ifdef DEBUG_MODE_FULL // Iconize the location of the actual laserTarget -_pos = [_laserTarget] call FUNC(getPosASL); +_pos = getPosASL _laserTarget; drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoATL _pos), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"]; { diff --git a/addons/laser/functions/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf index 27904597241..378ee384076 100644 --- a/addons/laser/functions/fnc_laser_init.sqf +++ b/addons/laser/functions/fnc_laser_init.sqf @@ -1,25 +1,32 @@ +//#define DEBUG_MODE_FULL #include "script_component.hpp" -PARAMS_1(_laserTarget); - TRACE_1("enter", _this); +PARAMS_1(_laserTarget); + // Add the target to the global targets array // Everyone tracks them - // Add the laser localized to the laser array, and give it the default localized code -PUSH(ACE_LASERS, _laserTarget); +PUSH(GVAR(VanillaLasers), _laserTarget); + // Check the vehicle, otherwise use the default -_laserTarget setVariable ["ACE_LASER_CODE", ACE_DEFAULT_LASER_CODE, false]; +_laserTarget setVariable [QGVAR(code), ACE_DEFAULT_LASER_CODE, false]; +_laserTarget setVariable [QGVAR(beamSpread), ACE_DEFAULT_LASER_BEAMSPREAD, false]; +_laserTarget setVariable [QGVAR(waveLength), ACE_DEFAULT_LASER_WAVELENGTH, false]; + // Clean the lasers of any null objects while we are here -REM(ACE_LASERS, objNull); +REM(GVAR(VanillaLasers), objNull); if(!(local _laserTarget)) exitWith { }; + // The target is local, so its on this client if(!isDedicated) then { - _laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", ACE_player, true]; - - [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player]] call cba_fnc_addPerFrameHandler; + // @TODO: Get ownership variables and set them on the vehicle + + _uuid = [(vehicle ACE_player), ACE_player, QFUNC(vanillaLaserSeekerHandler), ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_CODE, ACE_DEFAULT_LASER_BEAMSPREAD] call FUNC(laserOn); + _laserTarget setVariable [QGVAR(uuid), _uuid, false]; + [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call cba_fnc_addPerFrameHandler; } else { // server side ownership of laser - //_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", nil, false]; + _laserTarget setVariable [QGVAR(owner), nil, true]; }; diff --git a/addons/laser/functions/fnc_rotateVectLine.sqf b/addons/laser/functions/fnc_rotateVectLine.sqf index b0360cc3309..ec85a83cb74 100644 --- a/addons/laser/functions/fnc_rotateVectLine.sqf +++ b/addons/laser/functions/fnc_rotateVectLine.sqf @@ -32,7 +32,5 @@ if (_d != 0) then { }; /* Inverse of step 1 */ -_q1 set[0, (_q2 select 0) + (_p1 select 0)]; -_q1 set[1, (_q2 select 1) + (_p1 select 1)]; -_q1 set[2, (_q2 select 2) + (_p1 select 2)]; +_q1 = _q2 vectorAdd _p1; _q1; \ No newline at end of file diff --git a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf index fdbd6533ef7..dc4b1b54c3e 100644 --- a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf +++ b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf @@ -5,19 +5,12 @@ _p = _this select 0; _p1 = _this select 1; _p2 = _this select 2; -_q1 = []; _q2 = []; -_u = []; /* Step 1 */ -_q1 set[0, (_p select 0) - (_p1 select 0)]; -_q1 set[1, (_p select 1) - (_p1 select 1)]; -_q1 set[2, (_p select 2) - (_p1 select 2)]; - -_u set[0, (_p2 select 0) - (_p1 select 0)]; -_u set[1, (_p2 select 1) - (_p1 select 1)]; -_u set[2, (_p2 select 2) - (_p1 select 2)]; -_u = _u call BIS_fnc_unitVector; +_q1 = _p vectorDiff _p1; +_u = _p2 vectorDiff _p1; +_u = vectorNormalized _u; _d = sqrt((_u select 1)*(_u select 1) + (_u select 2)*(_u select 2)); /* Step 2 */ diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf new file mode 100644 index 00000000000..41ea877739e --- /dev/null +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -0,0 +1,155 @@ +/* + * Author: Nou + * Turn a laser designator on. + * + * Arguments: + * 0: Position of seeker (ASL) + * 1: Direction vector (will be normalized) + * 2: Seeker FOV in degrees + * 3: Seeker wavelength sensitivity range, [1550,1550] is common eye safe. + * 4: Seeker laser code. + * + * Return value: + * Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. + */ + +#include "script_component.hpp" + +private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method", + "_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; +_dir = vectorNormalized (_this select 1); +_seekerFov = _this select 2; +_seekerWavelengths = _this select 3; +_seekerCode = _this select 4; + + +_seekerCos = cos _seekerFov; + +_spots = []; +_buckets = []; +_excludes = []; +_bucketIndex = 0; +_finalPos = nil; +_finalOwner = nil; + +{ + _obj = _x select 0; + _owner = _x select 1; + _method = _x select 2; + _emitterWavelength = _x select 3; + _laserCode = _x select 4; + _divergence = _x select 5; + if(alive _obj && {_emitterWavelength >= (_seekerWavelengths select 0)} && {_emitterWavelength <= (_seekerWavelengths select 1)} && {_laserCode == _seekerCode}) then { + _laser = []; + if(IS_CODE(_method)) then { + _laser = _x call _method; + } else { + if(IS_STRING(_method)) then { + _laser = _x call (missionNamespace getVariable [_method, {}]); + } else { + if(IS_ARRAY(_method)) then { + if(count _method == 2) then { + _laser = [ATLtoASL (_obj modelToWorldVisual (_method select 0)), _obj weaponDirection (_method select 1)]; + } else { + if(count _method == 3) then { + _laser = [ATLtoASL (_obj modelToWorldVisual (_method select 0)), (ATLtoASL (_obj modelToWorldVisual (_method select 1))) vectorFromTo (ATLtoASL (_obj modelToWorldVisual (_method select 2)))]; + }; + }; + }; + }; + }; + _laserPos = _laser select 0; + _laserDir = _laser select 1; + _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); + { + _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); + +if((count _spots) > 0) then { + _bucketPos = nil; + _bucketList = nil; + _c = 0; + while { count(_spots) != count(_excludes) && _c < (count _spots) } do { + scopeName "mainSearch"; + { + if(!(_forEachIndex in _excludes)) then { + _index = _buckets pushBack [_x, [_x]]; + _excludes pushBack _forEachIndex; + _bucketPos = _x select 0; + _bucketList = (_buckets select _index) select 1; + breakTo "mainSearch"; + }; + } forEach _spots; + { + if(!(_forEachIndex in _excludes)) then { + _testPos = (_x select 0); + if(_testPos vectorDistanceSqr _bucketPos <= 100) then { + _bucketList pushBack _x; + _excludes pushBack _forEachIndex; + }; + }; + } forEach _spots; + _c = _c + 1; + }; + _finalBuckets = []; + _largest = -1; + _largestIndex = 0; + { + _index = _finalBuckets pushBack []; + _bucketList = _finalBuckets select _index; + { + _testPos = (_x select 0); + if(!terrainIntersectASL [_pos, _testPos] && {!lineIntersects [_pos, _testPos]}) then { + _bucketList pushBack _x; + }; + } forEach (_x select 1); + if((count _bucketList) > _largest) then { + _largest = (count _bucketList); + _largestIndex = _index; + }; + } forEach _buckets; + + _finalBucket = _finalBuckets select _largestIndex; + _owners = HASH_CREATE; + + if(count _finalBucket > 0) then { + _avgX = 0; + _avgY = 0; + _avgZ = 0; + { + player sideChat format["x: %1", _x]; + _avgX = _avgX + ((_x select 0) select 0); + _avgY = _avgY + ((_x select 0) select 1); + _avgZ = _avgZ + ((_x select 0) select 2); + _owner = _x select 1; + if(HASH_HASKEY(_owners, _owner)) then { + _count = HASH_GET(_owners, _owner); + HASH_SET(_owners, _owner, _count+1); + } else { + HASH_SET(_owners, _owner, 1); + }; + } forEach _finalBucket; + _count = count _finalBucket; + _finalPos = [_avgX/_count, _avgY/_count, _avgZ/_count]; + _maxOwner = -1; + _maxOwnerIndex = 0; + { + if((_owners select 1) select _forEachIndex > _maxOwner) then { + _maxOwner = (_owners select 1) select _forEachIndex; + _maxOwnerIndex = _forEachIndex; + }; + } forEach (_owners select 0); + _finalOwner = (_owners select 0) select _maxOwnerIndex; + }; +}; +[_finalPos, _owner]; diff --git a/addons/laser/functions/fnc_shootCone.sqf b/addons/laser/functions/fnc_shootCone.sqf index e33edd10bc1..801353d4f74 100644 --- a/addons/laser/functions/fnc_shootCone.sqf +++ b/addons/laser/functions/fnc_shootCone.sqf @@ -1,8 +1,17 @@ #include "script_component.hpp" - +//#define DEBUG_MODE_FULL +private ["_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result", + "_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"]; _divergence = 0.3; _pos = _this select 0; _vec = _this select 1; +if(count _this > 2) then { + _divergence = _this select 2; +}; +_count = 3; +if(count _this > 3) then { + _count = _this select 3; +}; _longestReturn = -1000000000; _shortestReturn = 1000000000; _resultPositions = []; @@ -10,7 +19,7 @@ _p1 = [0,0,0]; _p2 = +_vec; _p = (_vec call CBA_fnc_vect2polar); _v = [(_p select 0), (_p select 1), (_p select 2)+90] call CBA_fnc_polar2vect; -_cp = [_vec, _v] call BIS_fnc_crossProduct; +_cp = _vec vectorCrossProduct _v; _vecRotateMap = [_cp, _p1, _p2] call FUNC(rotateVectLineGetMap); @@ -24,28 +33,21 @@ if(!isNil "_resultPos") then { if(_distance > _longestReturn) then { _longestReturn = _distance; }; - _resultPositions set[(count _resultPositions), _result]; + _resultPositions pushBack _result; #ifdef DEBUG_MODE_FULL - DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + // DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + drawLine3D [ASLtoATL _pos, ASLtoATL _resultPos, [1,0,0,1]]; #endif }; -_count = 8; -_pos2 = [ - (_pos select 0)+((_vec select 0)*1000), - (_pos select 1)+((_vec select 1)*1000), - (_pos select 2)+((_vec select 2)*1000) - ]; + +_pos2 = _pos vectorAdd (_vec vectorMultiply 1000); { for "_i" from 0 to ceil(_count*_x) do { _radOffset = random 360; _offset = [_vecRotateMap, (((360/_count)*_i)+_radOffset) mod 360] call FUNC(rotateVectLine); - _offsetPos = [ - (_pos2 select 0)+((_offset select 0)*(_divergence*_x)), - (_pos2 select 1)+((_offset select 1)*(_divergence*_x)), - (_pos2 select 2)+((_offset select 2)*(_divergence*_x)) - ]; - _offsetVector = [_pos, _offsetPos] call BIS_fnc_vectorFromXtoY; + _offsetPos = _pos2 vectorAdd (_offset vectorMultiply (_divergence*_x)); + _offsetVector = _pos vectorFromTo _offsetPos; _result = [_pos, _offsetVector] call FUNC(shootRay); _resultPos = _result select 0; if(!isNil "_resultPos") then { @@ -56,9 +58,10 @@ _pos2 = [ if(_distance > _longestReturn) then { _longestReturn = _distance; }; - _resultPositions set[(count _resultPositions), _result]; + _resultPositions pushBack _result; #ifdef DEBUG_MODE_FULL - DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + // DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]]; + drawLine3D [ASLtoATL _pos, ASLtoATL _resultPos, [1,0,0,1]]; #endif }; }; diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 62847d16b6b..83b257ed7b2 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -11,13 +11,8 @@ _lastPos = +_pos; { scopeName "mainSearch"; for "_i" from 1 to 10 do { - _nextPos = [ - (_lastPos select 0)+((_vec select 0)*_x), - (_lastPos select 1)+((_vec select 1)*_x), - (_lastPos select 2)+((_vec select 2)*_x) - ]; - - if(lineIntersects [_lastPos, _nextPos] || terrainIntersectASL [_lastPos, _nextPos]) then { + _nextPos = _lastPos vectorAdd (_vec vectorMultiply _x); + if(terrainIntersectASL [_lastPos, _nextPos] || {lineIntersects [_lastPos, _nextPos]}) then { _resultPos = _lastPos; breakTo "mainSearch"; } else { @@ -25,6 +20,5 @@ _lastPos = +_pos; _lastPos = _nextPos; }; }; - } forEach _fidelity; [_resultPos, _distance]; \ No newline at end of file diff --git a/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf new file mode 100644 index 00000000000..38cd1839f95 --- /dev/null +++ b/addons/laser/functions/fnc_vanillaLaserSeekerHandler.sqf @@ -0,0 +1,26 @@ +/* + * Author: jaynus + * Handler function for laser network code. + * + * Argument: + * 0: Emitter + * 1: Owner + * + * Return value: + * [position, direction] + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +private["_emitter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"]; + +_emmiter = _this select 0; +_owner = _this select 1; + +// Not in a vehicle.... +// @TODO: handle lasering from turrets +if( (vehicle _emmiter) == _emmiter && alive _emmiter && (currentWeapon _emmiter) == "LaserDesignator") exitWith { + [(eyePos _emmiter), (eyeDirection _emmiter)] +}; + +[-1,-1] \ No newline at end of file diff --git a/addons/laser_selfdesignate/CfgUI.hpp b/addons/laser_selfdesignate/CfgUI.hpp deleted file mode 100644 index e8823e04f8a..00000000000 --- a/addons/laser_selfdesignate/CfgUI.hpp +++ /dev/null @@ -1,32 +0,0 @@ -class RscPicture; -class RscText; -class RscControlsGroupNoScrollbars; -/* This disables air radar. We need to make this a seperate HUD addon -class RscInGameUI -{ - class RscUnitInfo - { - class CA_Radar: RscControlsGroupNoScrollbars - { - class controls - { - class CA_RadarBackground: RscPicture { - colorText[] = {0,0,0,0}; - text = ""; - }; - class CA_RadarIcon: RscPicture { - colorText[] = {0,0,0,0}; - }; - class CA_Heading: RscText { - colorText[] = {0,0,0,0}; - }; - }; - }; - }; -}; -class CfgInGameUI -{ - -}; - -*/ \ No newline at end of file diff --git a/addons/laser_selfdesignate/CfgVehicles.hpp b/addons/laser_selfdesignate/CfgVehicles.hpp index b29d8a43946..02d8b32b3d1 100644 --- a/addons/laser_selfdesignate/CfgVehicles.hpp +++ b/addons/laser_selfdesignate/CfgVehicles.hpp @@ -8,12 +8,6 @@ class CfgVehicles { class Turrets { class MainTurret; }; - - // TODO: move these to a different HUD addon - // commanderCanSee = 2+32; - // gunnerCanSee = 2+32; - // driverCanSee = 2+32; - }; class Helicopter_Base_F: Helicopter {}; diff --git a/addons/laser_selfdesignate/XEH_pre_init.sqf b/addons/laser_selfdesignate/XEH_pre_init.sqf index dd971b95392..3f8c92e4dbe 100644 --- a/addons/laser_selfdesignate/XEH_pre_init.sqf +++ b/addons/laser_selfdesignate/XEH_pre_init.sqf @@ -5,7 +5,8 @@ PREP(laserHudDesignateOn); PREP(laserHudDesignateOff); PREP(unitTurretHasDesignator); -GVAR(laser) = nil; +PREP(findLaserSource); + GVAR(active) = false; FUNC(getPosASL) = {visiblePositionASL (_this select 0)}; diff --git a/addons/laser_selfdesignate/config.cpp b/addons/laser_selfdesignate/config.cpp index 33c31ba7e53..19ec28063b1 100644 --- a/addons/laser_selfdesignate/config.cpp +++ b/addons/laser_selfdesignate/config.cpp @@ -10,8 +10,6 @@ class CfgPatches { }; }; -#include "CfgUI.hpp" - #include "CfgEventhandlers.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf new file mode 100644 index 00000000000..ac1ae7e438d --- /dev/null +++ b/addons/laser_selfdesignate/functions/fnc_findLaserSource.sqf @@ -0,0 +1,30 @@ +/* + * Author: jaynus + * Handler function for laser network code. + * + * Argument: + * 0: Emitter + * 1: Owner + * + * Return value: + * [position, direction] + */ + //findLaserSource.sqf +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +private["_emitter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"]; + +_emmiter = _this select 0; +_owner = _this select 1; + +_gunnerInfo = [_emmiter, (currentWeapon _emmiter)] call CBA_fnc_getFirer; +_turretInfo = [_emmiter, _gunnerInfo select 1] call EFUNC(common,getTurretDirection); +_povPos = _turretInfo select 0; +_povDir = _turretInfo select 1; + +if(!isNil "_povPos" && !isNil "_povDir") exitWith { + [_povPos, _povDir] +}; + +[-1,-1] \ No newline at end of file diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf index 02ea7e6e70e..f8ff2ca0f57 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOff.sqf @@ -1,28 +1,30 @@ +/* + * Author: jaynus + * Turns off passed laser self designation. + * + * Argument: + * 0: Shooter, player shooting the laser + * 1: LaserUUID, the UUID of the laser returned by EFUNC(laser,laserOn) + * 2: Local laser target, unused. + * + * Return value: + * true + */ #include "script_component.hpp" if( (count _this) > 2) then { - EXPLODE_3_PVT(_this,_vehicle,_shooter,_laserTarget); - // We got the optional vehicle list, clear the parameters - _vehicle setVariable[QGVAR(currentTarget), [], true]; -}; - -if(isNil QGVAR(laser)) exitWith { - false -}; -if(!local GVAR(laser)) then { - false -}; + EXPLODE_3_PVT(_this,_shooter,_laserUuid, _localLaserTarget); -_handle = GVAR(laser) getVariable ["ACE_PFH_HANDLE", nil]; -if(!isNil "_handle") then { - [_handle] call cba_fnc_removePerFrameHandler; + [_laserUuid] call EFUNC(laser,laserOff); + // @TODO: Nou gets to field all tickets about missing lasers. + //deleteVehicle _localLaserTarget; }; -REM(ACE_LASERS, GVAR(laser)); -deleteVehicle GVAR(laser); -GVAR(laser) = nil; 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 a6c8fc22953..400bf217561 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -1,4 +1,14 @@ -//#define DEBUG_MODE_FULL +/* + * Author: jaynus + * Turns on laser self designation from this vehicle based on the turret. + * There are no arguments, because it is all strictly based on the users vehicle. + * + * Argument: + * + * Return value: + * N/A + */ + //#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); @@ -6,102 +16,74 @@ TRACE_1("enter", _this); #define FCS_UPDATE_DELAY 1 FUNC(laserHudDesignatePFH) = { - private["_strongestResultPos", "_args", "_laserTarget", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turret", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult", "_forceUpdateTime"]; + private["_strongestResultPos", "_args", "_localLaserTarget", "_laserResultPosition", "_laserResult", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turretInfo", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult", "_forceUpdateTime"]; _args = _this select 0; - _laserTarget = _args select 0; - _shooter = _args select 1; - - TRACE_1("", _args, (_laserTarget getVariable["ACE_LASER_CODE"])); - if((vehicle ACE_player) != _shooter || !alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(active) ) exitWith { - [_vehicle, _shooter, _laserTarget] call FUNC(laserHudDesignateOff); + _shooter = _args select 0; + _localLaserTarget = _args select 2; + _vehicle = vehicle _shooter; + TRACE_1("", _args); + + if((vehicle _shooter) == _shooter || {!alive _shooter} || {isNull _vehicle} || {!GVAR(active)} ) exitWith { + _args call FUNC(laserHudDesignateOff); }; if(!([_shooter] call FUNC(unitTurretHasDesignator)) ) exitWith { - [_vehicle, _shooter, _laserTarget] call FUNC(laserHudDesignateOff); + _args call FUNC(laserHudDesignateOff); }; - if( (count _args) < 3) then { - _args set[2, diag_tickTime + FCS_UPDATE_DELAY]; + if( (count _args) < 4) then { + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; }; - _forceUpdateTime = _args select 2; - - _vehicle = vehicle _shooter; - _weapon = currentWeapon _vehicle; + _forceUpdateTime = _args select 3; + + // @TODO: We don't have anything here we need to do the calculations for right now + /* - // Retrieve the gunner and turret memory point information - _gunnerInfo = [_vehicle, _weapon] call CBA_fnc_getFirer; + _gunnerInfo = [_vehicle, (currentWeapon _vehicle)] call CBA_fnc_getFirer; _turretInfo = [_vehicle, _gunnerInfo select 1] call EFUNC(common,getTurretDirection); _povPos = _turretInfo select 0; - _povDir = _turretInfo select 1; - _targetInfo = _vehicle getVariable[QGVAR(currentTarget), [] ]; - if( (count _targetInfo) > 0) then { - if(_laserTarget != (_targetInfo select 0) ) then { - _targetInfo = [] - }; - }; - if( (count _targetInfo) < 1) then { - _targetInfo = [_laserTarget, 1001]; // TODO: set laser code - _vehicle setVariable[QGVAR(currentTarget), _targetInfo, true]; - _laserTarget setVariable[QGVAR(owner), _vehicle, true]; - }; + _laserCode = (vehicle ACE_player) getVariable[QGVAR(currentCode), ACE_DEFAULT_LASER_CODE]; + _waveLength = (vehicle ACE_player) getVariable[QGVAR(currentWaveLength), ACE_DEFAULT_LASER_WAVELENGTH]; - _result = [_povPos, _povDir] call EFUNC(laser,shootCone); - if((count _result) > 0) then { - _resultPositions = _result select 2; + _laserResult = [_povPos, [_waveLength,_waveLength], _laserCode] call EFUNC(laser,seekerFindLaserSpot); + _laserResultPosition = _laserResult select 0; + TRACE_1("Search", _laserResult); - if((count _resultPositions) > 0) then { - _strongestResultPos = [_resultPositions, _povPos] call EFUNC(laser,findStrongestRay); - - // If the laser has moved less than a half meter, then dont move it. - // Just regular use of lasers will commonly make them move this much, - // but not across multiple close frames. - // This loses accuracy a little, but saves position updates per frame. - TRACE_5("", diag_tickTime, _forceUpdateTime, getPosASL _laserTarget, _strongestResultPos, ((getPosASL _laserTarget) distance _pos)); + if((count _laserResult) > 0) then { + // @TODO: Nou gets to field all tickets about missing lasers. + //_localLaserTarget setPosASL _laserResultPosition; + }; + */ - if(diag_tickTime > _forceUpdateTime) then { - TRACE_1("FCS Update", ""); - ["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent; - }; - - //if( (_laserTarget distance _strongestResultPos) > 0.1) then { - TRACE_1("LaserPos Update", ""); - _laserTarget setPosATL (ASLToATL _strongestResultPos); - //}; - - if(diag_tickTime > _forceUpdateTime) then { - _args set[2, diag_tickTime + FCS_UPDATE_DELAY]; - }; -#ifdef DEBUG_MODE_FULL - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], (getPosATL _laserTarget), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"]; - - { - private["_position"]; - _position = _x select 0; - drawLine3d [ASLToATL _povPos, ASLToATL _position, [0,0,1,1] ]; - } forEach _resultPositions; -#endif - }; + if(diag_tickTime > _forceUpdateTime) then { + ["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent; + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; }; _this set[0, _args]; }; -private ["_laserTarget", "_handle", "_vehicle"]; +private ["_laserTarget", "_handle", "_vehicle", "_laserUuid", "_waveLength", "_beamSpread", "_laserCode"]; -if(isNil QGVAR(laser)) then { - _laserTarget = "LaserTargetW" createVehicle (getpos ACE_player); - +if(!GVAR(active)) then { GVAR(active) = true; - _handle = [FUNC(laserHudDesignatePFH), 0.1, [_laserTarget, ACE_player]] call cba_fnc_addPerFrameHandler; - _laserTarget setVariable ["ACE_PFH_HANDLE", _handle, false]; + TRACE_1("Activating laser", ""); + + // Get the self-designation variables, or use defaults + _laserCode = (vehicle ACE_player) getVariable[QGVAR(currentCode), ACE_DEFAULT_LASER_CODE]; + _waveLength = (vehicle ACE_player) getVariable[QGVAR(currentWaveLength), ACE_DEFAULT_LASER_WAVELENGTH]; + _beamSpread = (vehicle ACE_player) getVariable[QGVAR(currentBeamSpread), ACE_DEFAULT_LASER_BEAMSPREAD]; - // Clear the vehicle parameters - _vehicle setVariable[QGVAR(currentTarget), [], true]; + _laserUuid = [(vehicle ACE_player), ACE_player, QFUNC(findLaserSource), _waveLength, _laserCode, _beamSpread] call EFUNC(laser,laserOn); - GVAR(laser) = _laserTarget; + // @TODO: Create the local target for the players side + // @TODO: Nou gets to field all tickets about missing lasers. + //_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player); + + GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call cba_fnc_addPerFrameHandler; } else { [] call FUNC(laserHudDesignateOff); [] call FUNC(laserHudDesignateOn); diff --git a/addons/laser_selfdesignate/stringtable.xml b/addons/laser_selfdesignate/stringtable.xml index 421280d33fa..2b78666f857 100644 --- a/addons/laser_selfdesignate/stringtable.xml +++ b/addons/laser_selfdesignate/stringtable.xml @@ -1,17 +1,25 @@  - - - Laser<br/>Designator On - Lasermarkierer<br/>an - Laser<br/>Designador encendido - ЛЦУ<br/>ВКЛ - - - Laser<br/>Designator Off - Lasermarkierer<br/>aus - Laser<br/>Designador apagado - ЛЦУ<br/>ВЫКЛ - - + + + Laser Designator On + Lasermarkierer an + Laser Designador encendido + ЛЦУ ВКЛ + Laserový značkovač zapnut + Desygnator laserowy wł. + Désignateur Laser Allumé + Lézeres Megjelölő Be + + + Laser Designator Off + Lasermarkierer aus + Laser Designador apagado + ЛЦУ ВЫКЛ + Laserový značkovat vypnut + Desygnator laserowy wył. + Désignateur Laser Éteint + Lézeres Megjelölő Ki + + diff --git a/addons/laserpointer/CfgVehicles.hpp b/addons/laserpointer/CfgVehicles.hpp index 8c81837fe22..5a0ece1b1f8 100644 --- a/addons/laserpointer/CfgVehicles.hpp +++ b/addons/laserpointer/CfgVehicles.hpp @@ -2,7 +2,7 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Support_F: NATO_Box_Base { class TransportItems { - MACRO_ADDITEM(ACE_acc_pointer_red,4); + MACRO_ADDITEM(ACE_acc_pointer_green,4); }; }; @@ -23,13 +23,12 @@ class CfgVehicles { class FIA_Box_Base_F; class Box_FIA_Support_F: FIA_Box_Base_F { class TransportItems { - MACRO_ADDITEM(ACE_acc_pointer_red,4); + MACRO_ADDITEM(ACE_acc_pointer_green,4); }; }; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - MACRO_ADDITEM(ACE_acc_pointer_red,4); MACRO_ADDITEM(ACE_acc_pointer_green,4); }; }; diff --git a/addons/laserpointer/CfgWeapons.hpp b/addons/laserpointer/CfgWeapons.hpp index 364f4b2168d..4f6a61c83a0 100644 --- a/addons/laserpointer/CfgWeapons.hpp +++ b/addons/laserpointer/CfgWeapons.hpp @@ -1,17 +1,28 @@ class SlotInfo; class PointerSlot: SlotInfo { - compatibleItems[] += {"ACE_acc_pointer_red","ACE_acc_pointer_green"}; + compatibleItems[] += {"ACE_acc_pointer_red","ACE_acc_pointer_green_IR","ACE_acc_pointer_green"}; }; class CfgWeapons { class ItemCore; class InventoryFlashLightItem_Base_F; + class acc_pointer_IR: ItemCore { + ACE_nextModeClass = "ACE_acc_pointer_red"; + ACE_modeDescription = "$STR_ACE_Laserpointer_IRLaser"; + + displayName = "$STR_ACE_Laserpointer_red"; + descriptionUse = "$STR_ACE_Laserpointer_useLaser"; + }; + class ACE_acc_pointer_red: ItemCore { + ACE_nextModeClass = "acc_pointer_IR"; + ACE_modeDescription = "$STR_ACE_Laserpointer_Laser"; + author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_acc_pointer_red"; - scope = 2; + scope = 1; displayName = "$STR_ACE_Laserpointer_red"; descriptionUse = "$STR_ACE_Laserpointer_useLaser"; picture = "\A3\weapons_F\Data\UI\gear_accv_pointer_CA.paa"; @@ -54,9 +65,23 @@ class CfgWeapons { inertia = 0.1; }; + class ACE_acc_pointer_green_IR: acc_pointer_IR { + ACE_nextModeClass = "ACE_acc_pointer_green"; + ACE_modeDescription = "$STR_ACE_Laserpointer_IRLaser"; + + author = "$STR_ACE_Common_ACETeam"; + _generalMacro = "ACE_acc_pointer_green"; + scope = 1; + displayName = "$STR_ACE_Laserpointer_green"; + }; + class ACE_acc_pointer_green: ACE_acc_pointer_red { + ACE_nextModeClass = "ACE_acc_pointer_green_IR"; + ACE_modeDescription = "$STR_ACE_Laserpointer_Laser"; + author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_acc_pointer_green"; + scope = 2; displayName = "$STR_ACE_Laserpointer_green"; }; }; diff --git a/addons/laserpointer/XEH_postInit.sqf b/addons/laserpointer/XEH_postInit.sqf index 14e4c384d80..38fc35f2625 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -11,11 +11,16 @@ GVAR(nearUnits) = []; // @todo. Maybe move to common? [{ private "_nearUnits"; - _nearUnits = nearestObjects [positionCameraToWorld [0,0,0], ["CAManBase"], 50]; + _nearUnits = []; - if (count _nearUnits > 10) then { - _nearUnits resize 10; - }; + { + _nearUnits append crew _x; + + if (count _nearUnits > 10) exitWith { + _nearUnits resize 10; + }; + + } forEach nearestObjects [positionCameraToWorld [0,0,0], ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV GVAR(nearUnits) = _nearUnits; @@ -24,3 +29,5 @@ GVAR(nearUnits) = []; addMissionEventHandler ["Draw3D", { call FUNC(onDraw); }]; + +#include "initKeybinds.sqf" diff --git a/addons/laserpointer/XEH_preInit.sqf b/addons/laserpointer/XEH_preInit.sqf index e7c74d34450..1460abda366 100644 --- a/addons/laserpointer/XEH_preInit.sqf +++ b/addons/laserpointer/XEH_preInit.sqf @@ -4,5 +4,6 @@ ADDON = false; PREP(drawLaserpoint); PREP(onDraw); +PREP(switchLaserLightMode); ADDON = true; diff --git a/addons/laserpointer/config.cpp b/addons/laserpointer/config.cpp index b97587dac6b..5ca5ce34701 100644 --- a/addons/laserpointer/config.cpp +++ b/addons/laserpointer/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { units[] = {}; - weapons[] = {"ACE_acc_pointer_red","ACE_acc_pointer_green"}; + weapons[] = {"ACE_acc_pointer_red","ACE_acc_pointer_green","ACE_acc_pointer_green_IR"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author[] = {"commy2"}; diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index 31be95099a1..93a421a0945 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -1,6 +1,19 @@ // by commy2 and esteldunedain #include "script_component.hpp" +// init object +/*if (isNil QGVAR(laserdot)) then { + _light = "#lightpoint" createVehicleLocal [0,0,0]; + _light setLightBrightness 10; + _light setLightColor [1,0,0]; + _light setLightAmbient [1,0,0]; + _light setLightDayLight true; + //_light lightAttachObject [GVAR(laserdot), [0,0,0]]; + _light setLightAttenuation [0.04,4,4,0,0.04,0.08]; + + GVAR(laserdot) = _light; +};*/ + EXPLODE_3_PVT(_this,_unit,_range,_isGreen); _p0Pos = _unit modelToWorldVisual (_unit selectionPosition "righthand"); @@ -97,13 +110,15 @@ if (!surfaceIsWater _pL) then { _pL = ASLtoATL _pL; }; +/* drawLine3D [ _p0Pos, _pL, [[1,0,0,1], [0,1,0,1]] select _isGreen ]; +*/ -_size = 2 * (_range - (positionCameraToWorld [0,0,0] distance _pL)) / _range; +_size = 2 * (_range - (positionCameraToWorld [0,0,0] vectorDistance _pL)) / _range; _camPos = positionCameraToWorld [0,0,0.2]; if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {}; @@ -114,6 +129,8 @@ if (!surfaceIsWater _camPos) then { _camPos = ATLtoASL _camPos; }; if ( terrainIntersectASL [_camPos, _pL2]) exitWith {}; if ( lineIntersects [_camPos, _pL2]) exitWith {}; +//GVAR(laserdot) setPos _pL; + drawIcon3D [ format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen], [[1,0.25,0.25,0.5*_brightness], [0.25,1,0.25,0.5*_brightness]] select _isGreen, diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index 6fa72755314..0e4ddf981a1 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -28,7 +28,7 @@ _isIR = _isIR == 1; _laserID = ["ACE_acc_pointer_red", "ACE_acc_pointer_green"] find _laser; if (_laserID > -1 && {_x isFlashlightOn _weapon}) then { - [_x, 30, _laserID == 1 || _isIR] call FUNC(drawLaserpoint); + [_x, 50, _laserID == 1 || _isIR] call FUNC(drawLaserpoint); }; } forEach GVAR(nearUnits); diff --git a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf new file mode 100644 index 00000000000..f996d6b270f --- /dev/null +++ b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf @@ -0,0 +1,58 @@ +// by commy2 +#include "script_component.hpp" + +private ["_unit", "_weapon"]; + +_unit = _this select 0; +_weapon = _this select 1; + +// 1 = primary, 2 = secondary, 3 = handgun +private "_currentWeaponType"; +_currentWeaponType = 0; + +private "_pointer"; +_pointer = switch (_weapon) do { + case (primaryWeapon _unit): { + _currentWeaponType = 1; + primaryWeaponItems _unit select 1 + }; + case (secondaryWeapon _unit): { + _currentWeaponType = 2; + secondaryWeaponItems _unit select 1 + }; + case (handgunWeapon _unit): { + _currentWeaponType = 3; + handgunItems _unit select 1 + }; + default {""}; +}; + +if (_pointer == "") exitWith {}; + +private "_nextPointer"; +_nextPointer = getText (configFile >> "CfgWeapons" >> _pointer >> "ACE_nextModeClass"); + +if (_nextPointer == "") exitWith {}; + +private ["_description", "_picture"]; + +_description = getText (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_modeDescription"); +_picture = getText (configFile >> "CfgWeapons" >> _nextPointer >> "picture"); + +switch (_currentWeaponType) do { + case 1: { + _unit removePrimaryWeaponItem _pointer; + _unit addPrimaryWeaponItem _nextPointer; + }; + case 2: { + _unit removeSecondaryWeaponItem _pointer; + _unit addSecondaryWeaponItem _nextPointer; + }; + case 3: { + _unit removeHandgunItem _pointer; + _unit addHandgunItem _nextPointer; + }; +}; + +[_description, _picture] call EFUNC(common,displayTextPicture); +playSound "ACE_Sound_Click"; diff --git a/addons/laserpointer/initKeybinds.sqf b/addons/laserpointer/initKeybinds.sqf new file mode 100644 index 00000000000..04516f07573 --- /dev/null +++ b/addons/laserpointer/initKeybinds.sqf @@ -0,0 +1,13 @@ +// by commy2 + +["ACE3", QGVAR(switchLaserLightMode), localize "STR_ACE_Laserpointer_switchLaserLight", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; + + [ACE_player, currentWeapon ACE_player] call FUNC(switchLaserLightMode); + true +}, +{false}, [38, [false, true, false]], false] call CBA_fnc_addKeybind; diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index 0479f8474b2..5d7aa03c67a 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -1,35 +1,62 @@  - - - - Laser Pointer (red) - Laserpointer (rot) - Лазерный прицел (красный) - Puntero láser (rojo) - - - Laser Pointer (green) - Laserpointer (grün) - Лазерный прицел (зелёный) - Puntero láser (verde) - - - Emits visible light. - Strahlt sichtbares Licht aus. - Испускает узкий пучок видимого света. - Emite luz visible. - - - <t color='#9cf953'>Use: </t>Turn Laser ON/OFF - <t color='#9cf953'>Použití: </t>Zapnout/vypnout laser - <t color='#9cf953'>Utiliser : </t>laser on/off - <t color='#9cf953'>Benutzen: </t>Laser EIN/AUS - <t color='#9cf953'>Uso: </t>Laser ON/OFF - <t color='#9cf953'>Użyj: </t>wł./wył. lasera - <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) + Lézer-pointer (piros) + Puntero láser (rojo) + + + Laser Pointer (green) + Pointeur laser (vert) + Laserpointer (grün) + Лазерный прицел (зелёный) + Laserové ukazovátko (zelené) + Wskaźnik laserowy (zielony) + Lézer-pointer (zöld) + Puntero láser (verde) + + + Emits visible light. + Emettre de la lumière visible + Strahlt sichtbares Licht aus. + Испускает узкий пучок видимого света. + Vyzařuje viditelné světlo. + Wydziela widzialne światło. + Látható fényt bocsát ki. + Emite luz visible. + + + <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 + <t color='#9cf953'>Használat: </t>Lézer BE/KI kapcsolása + + + Laser + Laser + Laser + + + IR Laser + IR-Laser + Laser IR + + + Switch Laser / IR Laser + Umschalten Laser / IR-Laser + Przełącz Laser / Laser IR + + diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index 3a8d958709c..b60353e29c7 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -1,78 +1,77 @@  - - - - Drone is full - Drohne ist voll - El VANT está lleno - L'UAV est chargé - Dron jest naładowany - A drón fel van töltve - Dron je nabitý - O VANT está cheio - Il drone è pieno - БПЛА заполнен - - - You need a UAV Battery - Du brauchst eine UAV-Batterie - Necesitas una batería para VANT - Pas de batterie UAV - Potrzebujesz baterii UAV - Szükséged van egy UAV akkumulátorra - Potřebuješ UAV-Baterii - Você precisa de uma Bateria para VANT - Hai bisogno di una Batteria UAV - Требуется аккумулятор для БПЛА - - - Recharge - Aufladen - Recargar - Recharger - Naładuj - Feltöltés - Dobít - Recarregar - Ricarica - Зарядить - - - UAV Battery - UAV-Batterie - Batería para VANT - Batterie UAV - Bateria UAV - UAV akkumulátor - UAV-Baterie - Bateria para VANT - Batteria UAV - Аккумулятор БПЛА - - - Used to refuel Carried UAV's - Verwendet zum Aufladen von tragbaren UAV's - Usada para reabastecer el VANT - Utilisée pour recharger l'UAV - Używana do naładowania UAV - Hordozható UAV-ok működéséhez való akkumulátor - Používané k dobíjení UAV - Usada para reabastecer VANT - Usata per ricaricare la Batteria dell'UAV - Используется для зарядки БПЛА - - - Recharging ... - Aufladen ... - Recargando ... - Rechargement ... - Ładowanie ... - Akku feltöltése ... - Dobíjení ... - Recarregando ... - In ricarica ... - Заряжается ... - - - \ No newline at end of file + + + Drone is full + Drohne ist voll + El VANT está lleno + L'UAV est chargé + Dron jest naładowany + A drón fel van töltve + Dron je nabitý + O VANT está cheio + Il drone è pieno + БПЛА заполнен + + + You need a UAV Battery + Du brauchst eine UAV-Batterie + Necesitas una batería para VANT + L'UAV nécessite une batterie + Potrzebujesz baterii UAV + Szükséged van egy UAV akkumulátorra + Potřebuješ UAV baterii + Você precisa de uma Bateria para VANT + Hai bisogno di una Batteria UAV + Требуется аккумулятор для БПЛА + + + Recharge + Aufladen + Recargar + Recharger + Naładuj + Feltöltés + Dobít + Recarregar + Ricarica + Зарядить + + + UAV Battery + UAV-Batterie + Batería para VANT + Batterie UAV + Bateria UAV + UAV akkumulátor + UAV baterie + Bateria para VANT + Batteria UAV + Аккумулятор БПЛА + + + Used to refuel Carried 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 + Hordozható UAV-k feltöltéséhez való akkumulátor + Používané k dobíjení UAV + Usada para reabastecer VANT + Usata per ricaricare la Batteria dell'UAV + Используется для зарядки БПЛА + + + Recharging ... + Aufladen ... + Recargando ... + Rechargement ... + Ładowanie ... + Akku feltöltése ... + Dobíjení ... + Recarregando ... + In ricarica ... + Заряжается ... + + + diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index ce823240d57..129075f0018 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -1,53 +1,61 @@  - - - Wirecutter - Drahtschneider - Cortador de cables - Клещи-кусачки - - - Wirecutter - Schneidet Draht. - Cortador de cables - Позволяют быстро перекусывать сеточные конструкции. - - - Cut Fence - Zaun schneiden - Cortar alambrado - Przetnij płot - Přestřihnout plot - Cisailler Clôture - Cortar Cerca - Taglia - Drótkerítés átvágása - Разрезать забор - - - Cutting Fences / Wires ... - Zaun / Draht schneiden ... - Cortando alambrado / cables ... - Przecinanie płotu / drutów ... - Přestřihnout plot / dráty ... - Cisaille l'obstacle ... - Cortando Cerca / Arame ... - Sto tagliando ... - Drótok elvágása ... - Разрезаем забор / провода ... - - - Fence cut - Zaun geschnitten - Alambrado cortado - Płot przecięty - Plot přestřižen - Clôture cisaillée - Cerca cortada - Fatto! - Drótkerítés átvágva - Забор разрезан - - + + + Wirecutter + Pince coupante + Drahtschneider + Cortador de cables + Клещи-кусачки + Štípací kleště + Nożyce do cięcia drutu + Drótvágó + + + Wirecutter + Schneidet Draht. + Cortador de cables + Позволяют быстро перекусывать сеточные конструкции. + Štípačky + Służą do cięcia drutu i płotów + Pince coupante + Drótok, huzalok, és kábelek vágására alkalmas olló. + + + Cut Fence + Zaun schneiden + Cortar alambrado + Przetnij płot + Přestřihnout plot + Cisailler Clôture + Cortar Cerca + Taglia + Drótkerítés átvágása + Разрезать забор + + + Cutting Fences / Wires ... + Zaun / Draht schneiden ... + Cortando alambrado / cables ... + Przecinanie płotu / drutów ... + Přestřihnout plot / dráty ... + Cisaille l'obstacle ... + Cortando Cerca / Arame ... + Sto tagliando ... + Drótok elvágása ... + Разрезаем забор / провода ... + + + Fence cut + Zaun geschnitten + Alambrado cortado + Płot przecięty + Plot přestřižen + Clôture cisaillée + Cerca cortada + Fatto! + Drótkerítés átvágva + Забор разрезан + + diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 06742ac2838..1f7e81ace27 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,95 +1,107 @@  - - - Repack<br/>Magazines - Magazine<br/>umpacken - Reorganizar<br/>cargadores - Réorganiser<br/>chargeurs - Przepakuj<br/>magazynki - Přepáskovat<br/>Zásobníky - Ricarica<br/>Caricatori - Reorganizar<br/>Carregadores - Újratárazás<br/> - Перепаковать<br/>магазины - - - Select Magazine Menu - Magazinauswahlmenü - Menú de selección de cargador - Sélectionner menu des chargeurs - Menu wyboru magazynków - Zvolit Menu Zásobníků - Seleziona Menù di Ricarica - Menu de Seleção de Carregador - Fegyvertár menü kiválasztás - Меню выбора магазинов - - - Select Mag - Magazin auswählen - Seleccionar cargador - Sélectionner chargeur - Wybierz magazynek - Zvolit Zásobník - Seleziona Caricatore - Selecionar Carregador - Tár kiválasztása - Выбрать магазин - - - Repacking Magazines ... - Magazine umpacken ... - Reorganizando cargadores ... - Réorganisation des chargeurs ... - Przepakowywanie magazynków ... - Páskuji Zásobníky ... - Sto ricaricando le munizioni ... - Reorganizando Carregadores ... - Újratárazás ... - Перепаковка магазинов ... - - - Repacked Magazines - Magazine umgepackt - Cargadores reorganizados - Chargeurs réorganisés - Magazynki przepakowane - Přepáskované Zásobníky - Caricatore ricaricato - Carregadores Reorganizados - Újratárazott tárak - Магазины перепакованы - - - %1 full mag(s) and %2 extra round(s) - %1 volle(s) Magazin(e) und %2 übrig gebliebene Patrone(n) - %1 cargador(es) completo(s) y %2 bala(s) extra(s) - %1 chargeur(s) plein(s) et %2 cartouche(s) en rab - %1 pełnych magazynków i %2 dodatkowych naboi - %1 plný zásobník(y) a %2 munice navíc - %1 caricatore/i pieno e %2 munizioni extra - %1 carregador(es) cheio(s) e %2 disparo(s) a mais - %1 tejles tár és %2 extra lőszer. - %1 полных магазина(ов) и %2 патрона(ов) - - - Repacking Finished - Wiederverpacken Fertig - Reembalaje finalizado - Перепаковка завершена - - - Repacking Interrupted - Umpacken Unterbrochen - Reembalaje interrumpido - Перепаковка прервана - - - %1 Full and %2 Partial - %1 Vollständigen und %2 Teilweisen - %1 Total y %2 Parcial - %1 полных и %2 неполных - - + + + Repack Magazines + Magazine umpacken + Reorganizar cargadores + Réorganiser chargeurs + Przepakuj magazynki + Přepáskovat Zásobníky + Ricarica Caricatori + Reorganizar Carregadores + Újratárazás + Перепаковать магазины + + + Select Magazine Menu + Magazinauswahlmenü + Menú de selección de cargador + Sélectionner menu des chargeurs + Menu wyboru magazynków + Zvolit Menu zásobníků + Seleziona Menù di Ricarica + Menu de Seleção de Carregador + Fegyvertár menü kiválasztás + Меню выбора магазинов + + + Select Mag + Magazin auswählen + Seleccionar cargador + Sélectionner chargeur + Wybierz magazynek + Zvolit zásobník + Seleziona Caricatore + Selecionar Carregador + Tár kiválasztása + Выбрать магазин + + + Repacking Magazines ... + Magazine umpacken ... + Reorganizando cargadores ... + Réorganisation des chargeurs ... + Przepakowywanie magazynków ... + Páskuji zásobníky ... + Sto ricaricando le munizioni ... + Reorganizando Carregadores ... + Újratárazás ... + Перепаковка магазинов ... + + + Repacked Magazines + Magazine umgepackt + Cargadores reorganizados + Chargeurs réorganisés + Magazynki przepakowane + Přepáskované zásobníky + Caricatore ricaricato + Carregadores Reorganizados + Újratárazott tárak + Магазины перепакованы + + + %1 full mag(s) and %2 extra round(s) + %1 volle(s) Magazin(e) und %2 übrig gebliebene Patrone(n) + %1 cargador(es) completo(s) y %2 bala(s) extra(s) + %1 chargeur(s) plein(s) et %2 cartouche(s) en rab + Pełnych magazynków: %1.<br /> Dodatkowych naboi: %2. + %1 plný zásobník(y) a %2 munice navíc + %1 caricatore/i pieno e %2 munizioni extra + %1 carregador(es) cheio(s) e %2 disparo(s) a mais + %1 teljes tár és %2 extra lőszer + %1 полных магазина(ов) и %2 патрона(ов) + + + Repacking Finished + Réorganisation terminée + Wiederverpacken Fertig + Reembalaje finalizado + Перепаковка завершена + Páskování dokončeno + Przepakowywanie zakończone + Újratárazás befejezve + + + Repacking Interrupted + Réorganisation interrompue + Umpacken Unterbrochen + Reembalaje interrumpido + Перепаковка прервана + Páskování přerušeno + Przepakowywanie przerwane + Újratárazás megszakítva + + + %1 Full and %2 Partial + %1 plein(s) et %2 partiel(s) + %1 Vollständigen und %2 Teilweisen + %1 Total y %2 Parcial + %1 полных и %2 неполных + %1 plný a %2 částečně + Pełnych: %1.<br />Częściowo pełnych: %2. + %1 teljes és %2 részleges + + diff --git a/addons/magazines/$PBOPREFIX$ b/addons/magazines/$PBOPREFIX$ deleted file mode 100644 index dee71053cc1..00000000000 --- 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 2e1e9fceea3..00000000000 --- a/addons/magazines/CfgAmmo.hpp +++ /dev/null @@ -1,110 +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; - }; -}; diff --git a/addons/magazines/CfgMagazines.hpp b/addons/magazines/CfgMagazines.hpp deleted file mode 100644 index 86cb6d9e1b9..00000000000 --- a/addons/magazines/CfgMagazines.hpp +++ /dev/null @@ -1,139 +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"; - }; -}; diff --git a/addons/magazines/CfgVehicles.hpp b/addons/magazines/CfgVehicles.hpp deleted file mode 100644 index a7c2654d716..00000000000 --- a/addons/magazines/CfgVehicles.hpp +++ /dev/null @@ -1,158 +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);*/ - }; - }; -}; diff --git a/addons/magazines/CfgWeapons.hpp b/addons/magazines/CfgWeapons.hpp deleted file mode 100644 index e51a7085909..00000000000 --- a/addons/magazines/CfgWeapons.hpp +++ /dev/null @@ -1,374 +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 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" - }; - }; - - - /* 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 041a5622682..00000000000 --- 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 c757d62f5cc..00000000000 --- 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 1a711e8c374..00000000000 --- a/addons/magazines/newclasses.txt +++ /dev/null @@ -1,39 +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 - - -// 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 diff --git a/addons/magazines/script_component.hpp b/addons/magazines/script_component.hpp deleted file mode 100644 index 2fa1b774f55..00000000000 --- 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/magazines/stringtable.xml b/addons/magazines/stringtable.xml deleted file mode 100644 index db637f8064b..00000000000 --- a/addons/magazines/stringtable.xml +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - 6.5mm 30Rnd Tracer IR-DIM Mag - 6,5 mm Nyomjelző IR-DIM 30-as Tár - 6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 6,5mm - Ch. 6,5mm 30Cps Traçantes IR-DIM - Magazynek 6,5mm 30rd Smugacz IR-DIM - 6.5mm 30ks Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 6,5mm - Caricatore 6.5mm 30Rnd Traccianti IR-DIM - Магазин из 30-ти 6.5 мм трассирующих под ПНВ - - - 6.5mm IR-DIM - 6,5 mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM - 6,5mm IR-DIM - 6.5 IR-DIM - 6.5 мм ИК-трассирующие - - - Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lőszerek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL - Kaliber: 6,5 x 39 mm Smugowy IR-DIM<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39 mm Svítící IR-DIM<br />Munice: 30<br />Použití: MX/C/M/SW/3GL - Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39 mm Traccianti IR-DIM <br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL - Калибр: 6.5x39 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL - - - 6.5mm 30Rnd SD Mag - 6,5 mm Hangtompítós 30-as Tár - 6,5 mm 30-Schuss-Magazin SD - Cargador de 30 balas SD de 6,5mm - Ch. 6,5mm 30Cps SD - Magazynek 6,5mm 30rd SD - 6.5mm 30ks SD Zásobník - Carregador de 30 projéteis SD de 6,5mm - Caricatore 6.5mm 30Rnd Sil. - Магазин из 30-ти 6.5 мм дозвуковых - - - 6.5mm SD - 6,5 mm Hangtompítós - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6.5mm SD - 6,5mm SD - 6.5mm Sil. - 6.5 мм дозвуковые - - - Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm Hangtompítós<br />Lőszerek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL - Kaliber: 6,5 x 39 mm SD<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39 mm SD<br />Munice: 30<br />Použití: MX/C/M/SW/3GL - Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL - Калибр: 6.5x39 мм дозвуковые<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL - - - 6.5mm 30Rnd AP Mag - 6,5 mm Páncéltörő 30-as Tár - 6,5 mm 30-Schuss-Magazin AP - Cargador de 30 balas AP de 6,5mm - Ch. 6,5mm 30Cps AP - Magazynek 6,5mm 30rd AP - 6.5mm 30ks AP Zásobník - Carregador de 30 projéteis AP de 6,5mm - Caricatore 6.5mm 30Rnd AP - Магазин из 30-ти 6.5 мм бронебойных - - - 6.5mm AP - 6,5 mm Páncéltörő - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6.5mm AP - 6,5mm AP - 6.5mm AP - 6.5 мм бронебойные - - - Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm Páncéltörő<br />Lőszerek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé dans: MX/C/M/SW/3GL - Kaliber: 6,5 x 39 mm AP<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39 mm AP<br />Munice: 30<br />Použití: MX/C/M/SW/3GL - Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL - Калибр: 6.5x39 мм бронебойные<br />Патронов: 30<br />Применимы в: MX/C/M/SW/3GL - - - - 6.5mm 30Rnd Tracer IR-DIM Mag - 6,5mm IR-DIM Nyomjelző 30-as Tár - 6,5 mm 30-Schuss-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 6,5mm - Ch. 6,5mm 30Cps Traçantes IR-DIM - Magazynek 6,5mm 30rd Smugacz IR-DIM - 6.5mm 30ks Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 6,5mm - Caricatore 6.5mm 30Rnd Traccianti IR-DIM - Магазин из 30-ти 6.5 мм трассирующих под ПНВ - - - 6.5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM - 6.5 мм ИК-трассирующие - - - Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lőszerek: 30<br />Használható: Katiba - Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: Katiba - Kaliber: 6,5x39 mm Smugowy IR-DIM<br />Pociski: 30<br />Używane w: Katiba - Ráže: 6.5x39 mm Svítící IR-DIM<br />Munice: 30<br />Použití: Katiba - Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39 mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba - Калибр: 6.5x39 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: Katiba - - - 6.5mm 30Rnd SD Mag - 6,5 mm Hangtompítós 30-as Tár - 6,5 mm 30-Schuss-Magazin SD - Cargador de 30 balas SD de 6,5mm - Ch. 6,5mm 30Cps SD - Magazynek 6,5mm 30rd SD - 6.5mm 30ks SD Zásobník - Carregador de 30 projéteis SD de 6,5mm - Caricatore 6.5mm 30Rnd Sil. - Магазин из 30-ти 6.5 мм дозвуковых - - - 6.5mm SD - 6,5 mm Hangtompítós - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6.5mm SD - 6,5mm SD - 6.5mm Sil. - 6.5 мм дозвуковые - - - Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39 mm Hangtompítós<br />Lőszerek: 30<br />Használható: Katiba - Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé dans: Katiba - Kaliber: 6,5 x 39 mm SD<br />Naboje: 30<br />Używane w: Katiba - Ráže: 6.5x39 mm SD<br />Munice: 30<br />Použití: Katiba - Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: Katiba - Калибр: 6.5x39 мм дозвуковые<br />Патронов: 30<br />Применимы в: Katiba - - - 6.5mm 30Rnd AP Mag - 6,5 mm Páncéltörő 30-as Tár - 6,5 mm 30-Schuss-Magazin AP - Cargador de 30 balas AP de 6,5mm - Ch. 6,5mm 30Cps AP - Magazynek 6,5mm 30rd AP - 6.5mm 30ks AP Zásobník - Carregador de 30 projéteis AP de 6,5mm - Caricatore 6.5mm 30Rnd AP - Магазин из 30-ти 6.5 мм бронебойных - - - 6.5mm AP - 6,5 mm Páncéltörő - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6.5mm AP - 6,5mm AP - 6.5mm AP - 6.5 мм бронебойные - - - Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39 mm Páncéltörő<br />Lőszerek: 30<br />Használható: Katiba - Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé dans: Katiba - Kaliber: 6,5 x 39 mm AP<br />Pociski: 30<br />Używane w: Katiba - Ráže: 6.5x39 mm AP<br />Munice: 30<br />Použití: Katiba - Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: Katiba - Калибр: 6.5x39 мм бронебойные<br />Патронов: 30<br />Применимы в: Katiba - - - - 5.56mm 30rnd Tracer IR-DIM Mag - 5,56 mm Nyomjelző IR-DIM 30-as Tár - 5,56 mm 30-Schuss-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 5,56mm - Ch. 5,56mm 30Cps Traçantes IR-DIM - Magazynek 5,56mm 30rd Smugacz IR-DIM - 5.56mm 30ks Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 5,56mm - Caricatore 5.56mm 30rnd Traccianti IR-DIM - Магазин из 30-ти 5.56 мм трассирующих под ПНВ - - - 5.56mm IR-DIM - 5,56 mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5.56mm IR-DIM - 5,56mm IR-DIM - 5.56mm IR-DIM - 5.56 мм ИК-трассирующие - - - Caliber: 5.56x45 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm Nyomjelző IR-DIM<br />Lőszerek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56 x 45 mm Smugowy IR-DIM<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Ráže: 5.56x45 mm Svítící IR-DIM<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibro: 5.56x45 mm Traccianti IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Калибр: 5.56x45 мм трассирующие под ПНВ<br />Патронов: 30<br />Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - - - 5.56mm 30Rnd SD Mag - 5,56 mm Hangtompítós 30-as Tár - 5,56 mm 30-Schuss-Magazin SD - Cargador de 30 balas SD de 5,56 mm - Ch. 5,56mm 30Cps SD - Magazynek 5,56mm 30rd SD - 5.56mm 30ks SD Zásobník - Carregador de 30 projéteis SD de 5,56mm - Caricatore 5.56mm 30Rnd Sil. - Магазин из 30-ти 5.56 мм дозвуковых - - - 5.56mm SD - 5,56 mm Hangtompítós - 5,56mm SD - 5,56 mm SD - 5,56mm SD - 5,56mm SD - 5.56mm SD - 5,56mm SD - 5.56 Sil. - 5.56 мм дозвуковые - - - Caliber: 5.56x45 mm SD<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm Hangtompítós<br />Lőszerek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm SD<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm SD<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5.56x45 mm SD<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56 x 45 mm SD<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Ráže: 5.56x45 mm SD<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm SD<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibro: 5.56x45 mm Sil.<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Калибр: 5.56x45 мм дозвуковые<br />Патронов: 30<br />Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - - - 5.56mm 30Rnd AP Mag - 5,56 mm Páncéltörő 30-as Tár - 5,56 mm 30-Schuss-Magazin AP - Cargador de 30 balas AP de 5,56mm - Ch. 5,56mm 30Cps AP - Magazynek 5,56mm 30rd AP - 5.56mm 30ks AP Zásobník - Carregador de 30 projéteis AP de 5,56mm - Caricatore 5.56mm 30Rnd AP - Магазин из 30-ти 5.56 мм бронебойных - - - 5.56mm AP - 5,56 mm Páncéltörő - 5,56mm AP - 5,56mm AP - 5,56mm AP - 5,56mm AP - 5.56mm AP - 5,56mm AP - 5.56mm AP - 5.56 мм бронебойные - - - Caliber: 5.56x45 mm AP<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm Páncéltörő<br />Lőszerek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45 mm AP<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm AP<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm AP<br />Cartouches: 30<br />Utilisé dans: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56 x 45 mm AP<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Ráže: 5.56x45 mm AP<br />Munice: 30<br />Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45 mm AP<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibro: 5.56x45 mm AP<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Калибр: 5.56x45 мм бронебойные<br />Патронов: 30<br />Применимы в: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - - - - 7.62mm 20rnd Tracer Mag - 7,62 mm Nyomjelző IR-DIM 20-as Tár - 7,62 mm 20-Schuss-Magazin Leuchtspur - Cargador de 20 balas trazadores de 7,62mm - Ch. 7,62mm 20Cps Traçantes - Magazynek 7,62mm 20rd Smugacz - 7.62mm 20ks Svítící Zásobník - Carregador de 20 projéteis traçantes de 7,62mm - Caricatore 7.62mm 20Rnd Traccianti - Магазин из 20-ти 7.62 мм трассирующих - - - 7.62mm Tracer - 7,62 mm Nyomjelző - 7,62mm Leuchtspur - 7,62mm Trazadora - 7,62mm Traçantes - 7,62mm Smugacz - 7.62mm Svítící - 7,62mm Traçante - 7.62mm Traccianti - 7.62 мм трассирущие - - - Caliber: 7.62x51 mm Tracer<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51 mm Nyomjelző<br />Lőszerek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51 mm Leuchtspur<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51 mm Trazadora<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51 mm Traçantes<br />Cartouches: 20<br />Utilisé dans: EBR - Kaliber: 7,62 x 51 mm Smugacz<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51 mm Svítící<br />Munice: 20<br />Použití: Mk18 ABR - Calibre: 7,62x51 mm Traçante<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51 mm Traccianti<br />Munizioni: 20<br />In uso su: Mk18 ABR - Калибр: 7.62x51 мм трассирующие<br />Патронов: 20<br />Применимы в: Mk18 ABR - - - 7.62mm 20rnd Tracer IR-DIM Mag - 7,62 mm Nyomjelző IR-DIM 20-as Tár - 7,62 mm 20-Schuss-Magazin Leuchtspur IR-DIM - Cargador de 20 balas IR-DIM de 7,62mm - Ch. 7,62mm 20Cps Traçantes IR-DIM - Magazynek 7,62mm 20rd Smugacz IR-DIM - 7.62mm 20ks Svítící IR-DIM Zásobník - Carregador de 20 projéteis IR-DIM de 7,62mm - Caricatore 7.62mm 20rnd Traccianti IR-DIM - Магазин из 20-ти 7.62 мм трассирующих под ПНВ - - - 7.62mm IR-DIM - 7,62 mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7.62mm IR-DIM - 7,62mm IR-DIM - 7.62mm IR-DIM - 7.62 мм ИК-трассирующие - - - Caliber: 7.62x51 mm Tracer IR-DIM<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51 mm Nyomjelző IR-DIM<br />Lőszerek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51 mm Leuchtspur IR-DIM<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51 mm Trazadoras IR-DIM<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51 mm Traçantes IR-DIM<br />Cartouches: 20<br />Utilisé dans: EBR - Kaliber: 7,62 x 51 mm Smugacz IR-DIM<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51 mm Svítící IR-DIM<br />Munice: 20<br />Použití: Mk18 ABR - Calibre: 7,62x51 mm Traçante IR-DIM<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51 mm Traccianti IR-DIM<br />Munizioni: 20<br />In uso su: Mk18 ABR - Калибр: 7.62x51 мм трассирующие под ПНВ<br />Патронов: 20<br />Применимы в: Mk18 ABR - - - 7.62mm 20Rnd SD Mag - 7,62 mm Hangtompítós 20-as Tár - 7,62 mm 20-Schuss-Magazin SD - Cargador de 20 balas SD de 7,62mm - Ch. 7,62mm 20Cps SD - Magazynek 7,62mm 20rd SD - 7.62mm 20ks SD Zásobník - Carregador de 20 projéteis SD de 7,62mm - Caricatore 7.62mm 20Rnd Sil. - Магазин из 20-ти 7.62 мм дозвуковых - - - 7.62mm SD - 7,62 mm Hangtompítós - 7,62mm SD - 7,62mm SD - 7,62mm SD - 7,62mm SD - 7.62mm SD - 7,62mm SD - 7.62mm Sil. - 7.62 мм дозвуковые - - - Caliber: 7.62x51 mm SD<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51 mm Hangtompítós<br />Lőszerek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51 mm SD<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51 mm SD<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51 mm SD<br />Cartouches: 20<br />Utilisé dans: EBR - Kaliber: 7,62 x 51 mm SD<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51 mm SD<br />Munice: 20<br />Použití: Mk18 ABR - Calibre: 7,62x51 mm SD<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51 mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR - Калибр: 7.62x51 мм дозвуковые<br />Патронов: 20<br />Применимы в: Mk18 ABR - - - 7.62mm 20Rnd AP Mag - 7,62 mm Páncéltörő 20-as Tár - 7,62 mm 20-Schuss-Magazin AP - Cargador de 20 balas AP de 7,62mm - Ch. 7,62mm 20Cps AP - Magazynek 7,62mm 20rd AP - 7.62mm 20ks AP Zásobník - Carregador de 20 projéteis AP de 7,62mm - Caricatore 7.62mm 20Rnd AP - Магазин из 20-ти 7.62 мм бронебойных - - - 7.62mm AP - 7,62 mm Páncéltörő - 7,62mm AP - 7,62mm AP - 7,62mm AP - 7,62mm AP - 7.62mm AP - 7,62mm AP - 7.62mm AP - 7.62 мм бронебойные - - - Caliber: 7.62x51 mm AP<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51 mm Páncéltörő<br />Lőszerek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51 mm AP<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51 mm AP<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51 mm AP<br />Cartouches: 20<br />Utilisé dans: EBR - Kaliber: 7,62 x 51 mm AP<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51 mm AP<br />Munice: 20<br />Použití: Mk18 ABR - Calibre: 7,62x51 mm AP<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51 mm AP<br />Munizioni: 20<br />In uso su: Mk18 ABR - Калибр: 7.62x51 мм дозвуковые<br />Патронов: 20<br />Применимы в: Mk18 ABR - - - Caliber: 7.62x51mm M118LR<br />Rounds: 20<br />Type: M14 - Kaliber: 7,62x51 mm M118LR<br />Lőszerek: 20<br />Típus: M14 - Kaliber: 7,62x51mm M118LR<br />Schuss: 20<br />Typ: M14 - Calibre: 7,62x51mm M118LR<br />Balas: 20<br />Tipo: M14 - Kaliber: 7,62 x 51 mm M118LR<br />Pociski: 20<br />Typ: M14 - Kalibr: 7.62x51mm M118LR<br />Náboje: 20<br />Typ: M14 - Calibre : 7,62x51mm M118LR<br />Cartouches: 20<br />Type: M14 - Calibre: 7,62x51mm M118LR<br />Projéteis: 20<br />Tipo: M14 - Калибр: 7.62x51mm M118LR<br />Патронов: 20<br />Тип: M14 - Calibro: 7.62x51mm M118LR<br />Munizioni:20<br />In uso su: M14 - - - \ No newline at end of file diff --git a/addons/main/About.hpp b/addons/main/About.hpp deleted file mode 100644 index c455c43cc3f..00000000000 --- 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 1f86959585a..5297ec1e993 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 c9004edfe16..00000000000 --- 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 d0787102478..00000000000 --- 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 e97d9c51a3e..00000000000 --- 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 b3f6863d49c..00000000000 --- 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 e39240286ee..00000000000 --- 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 79f95545cab..fce9ec526a6 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 35a8e2be45a..00000000000 --- 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 6ef5ec3f68d..25a18e8dc24 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 2e5fee49ab5..c7c7ad759a1 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -1,148 +1,148 @@  - + - - - Map Tools - Herramientas de mapa - Outils de navigation - Narzędzia nawigacyjne - Kartenwerkzeug - Pomůcky k Mapě - Strumenti Cartografici - Ferramentas de Mapa - Térképészeti eszközök - Инструменты карты - - - The Map Tools allow you to measure distances and angles on the map. - 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. - 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. - A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen. - Картографические инструменты позволяют измерять расстояния и углы на карте. - - - Map Tools - Herramientas de mapa - Outils de navigation - Narzędzia nawigacyjne - Kartenwerkzeug - Pomůcky k Mapě - Strumenti Cartografici - Ferramentas de Mapa - Térképészeti eszközök - Инструменты карты - - - Hide Map Tool - Verstecke Kartenwerkzeug - Ocultar herr. de mapa - Ranger les outils - Nascondi Strumenti Cartografici - Ocultar Ferramenta de Mapa - Térképészeti eszközök elrejtése - Ukryj narzędzia nawigacyjne - Schovat pomůcku k mapě - Скрыть инструменты - - - Show Normal Map Tool - Zeige Kartenwerkzeug (normal) - Mostrar herr. de mapa normal - Montrer outils normaux - Visualizza Strumenti Cartografici standard - Mostrar Ferramenta de Mapa Padrão - Térképészeti eszköz megjelenítése (normál méret) - Pokaż normalne narzędzia nawigacyjne - Zobrazit normální pomůcku k mapě - Показать инструменты (средн. размер) - - - Show Small Map Tool - Zeige Kartenwerkzeug (klein) - Mostrar herr. de mapa pequeñas - Montrer petits outils - Visualizza Strumenti Cartografici piccoli - Mostrar Ferramenta de Mapa Pequena - Térképészeti eszköz megjelenítése (kicsinyített) - Pokaż pomniejszone narzędzia nawigacyjne - Zobrazit malou pomůcku k mapě - Показать инструменты (малый размер) - - - Align Map Tool to North - Kartenwerkzeug nach Norden ausrichten - Alinear herr. de mapa al norte - Aligner au nord - Allinea gli Strumenti Cartografici con il Nord - Alinhar Ferramenta de Mapa com o Norte - Térképészeti eszköz Északhoz állítása - Wyrównaj linijkę do północy - Srovnat pomůcku k mapě na sever - Выровнять инструменты на север - - - Align Map Tool to Compass - Kartenwerkzeug am Kompass ausrichten - Alinear herr. de mapa a la brújula - Aligner sur la boussole - Allinea gli Strumenti Cartografici con la bussola - Alinhar Ferramenta de Mapa com a Bússola - Térképészeti eszköz iránytűhöz állítása - Wyrównaj linijkę do kompasu - Srovnat pomůcku k mapě ke kompasu - Выровнять инструменты по компасу - - - Show GPS on Map - Zeige GPS auf der Karte - Mostrar el GPS sobre el mapa - Ranger le GPS - Visualizza il GPS sulla mappa - Mostrar GPS no Mapa - GPS megjelnítése a térképen - Pokaż GPS na mapie - Zobrazit GPS na mapě - Показать GPS на карте - - - Hide GPS on Map - Verstecke GPS auf der Karte - Ocultar el GPS del mapa - Montrer le GPS - Nascondi il GPS sulla mappa - Ocultar GPS no Mapa - GPS elrejtése térképről - Ukryj GPS na mapie - Schovat GPS na mapě - Скрыть GPS на карте - - - Copy Map - Karte kopieren - Copiar mapa - Скопировать карту - Kopiuj oznaczenia mapy - Copier la carte - Zkopírovat mapu - Copiare Carta - Térkép másolása - Copiar Mapa - - - Direction: %1° - Drehung: %1° - Direction: %1° - Směr: %1° - Kierunek: %1° - Dirección: %1° - Irány: %1 - Направление: %1° - - - \ No newline at end of file + + + Map Tools + Herramientas de mapa + Outils de navigation + Narzędzia nawigacyjne + Kartenwerkzeug + Pomůcky k mapě + Strumenti Cartografici + Ferramentas de Mapa + Térképészeti eszközök + Инструменты карты + + + The Map Tools allow you to measure distances and angles on the map. + 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 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. + A térképészeti eszközökkel távolságokat és szögeket tudsz mérni a térképen. + Картографические инструменты позволяют измерять расстояния и углы на карте. + + + Map Tools + Herramientas de mapa + Outils de navigation + Narzędzia nawigacyjne + Kartenwerkzeug + Pomůcky k mapě + Strumenti Cartografici + Ferramentas de Mapa + Térképészeti eszközök + Инструменты карты + + + Hide Map Tool + Verstecke Kartenwerkzeug + Ocultar herr. de mapa + Ranger les outils + Nascondi Strumenti Cartografici + Ocultar Ferramenta de Mapa + Térképészeti eszközök elrejtése + Ukryj narzędzia nawigacyjne + Schovat pomůcku k mapě + Скрыть инструменты + + + Show Normal Map Tool + Zeige Kartenwerkzeug (normal) + Mostrar herr. de mapa normal + Montrer outils normaux + Visualizza Strumenti Cartografici standard + Mostrar Ferramenta de Mapa Padrão + Térképészeti eszköz megjelenítése (normál méret) + Pokaż normalne narzędzia nawigacyjne + Zobrazit normální pomůcku k mapě + Показать инструменты (средн. размер) + + + Show Small Map Tool + Zeige Kartenwerkzeug (klein) + Mostrar herr. de mapa pequeñas + Montrer petits outils + Visualizza Strumenti Cartografici piccoli + Mostrar Ferramenta de Mapa Pequena + Térképészeti eszköz megjelenítése (kicsinyített) + Pokaż pomniejszone narzędzia nawigacyjne + Zobrazit malou pomůcku k mapě + Показать инструменты (малый размер) + + + Align Map Tool to North + Kartenwerkzeug nach Norden ausrichten + Alinear herr. de mapa al norte + Aligner au nord + Allinea gli Strumenti Cartografici con il Nord + Alinhar Ferramenta de Mapa com o Norte + Térképészeti eszköz Északhoz állítása + Wyrównaj linijkę do północy + Srovnat pomůcku k mapě na sever + Выровнять инструменты на север + + + Align Map Tool to Compass + Kartenwerkzeug am Kompass ausrichten + Alinear herr. de mapa a la brújula + Aligner sur la boussole + Allinea gli Strumenti Cartografici con la bussola + Alinhar Ferramenta de Mapa com a Bússola + Térképészeti eszköz iránytűhöz állítása + Wyrównaj linijkę do kompasu + Srovnat pomůcku k mapě ke kompasu + Выровнять инструменты по компасу + + + Show GPS on Map + Zeige GPS auf der Karte + Mostrar el GPS sobre el mapa + Ranger le GPS + Visualizza il GPS sulla mappa + Mostrar GPS no Mapa + GPS megjelenítése a térképen + Pokaż GPS na mapie + Zobrazit GPS na mapě + Показать GPS на карте + + + Hide GPS on Map + Verstecke GPS auf der Karte + Ocultar el GPS del mapa + Montrer le GPS + Nascondi il GPS sulla mappa + Ocultar GPS no Mapa + GPS elrejtése a térképről + Ukryj GPS na mapie + Schovat GPS na mapě + Скрыть GPS на карте + + + Copy Map + Karte kopieren + Copiar mapa + Скопировать карту + Kopiuj oznaczenia mapy + Copier la carte + Zkopírovat mapu + Copiare Carta + Térkép másolása + Copiar Mapa + + + Direction: %1° + Drehung: %1° + Direction: %1° + Směr: %1° + Kierunek: %1° + Dirección: %1° + Irány: %1 + Направление: %1° + + + diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 65da73a0268..73a4aff9bee 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,15 +1,16 @@  - + - - - Direction: %1° - Drehung: %1° - Direction: %1° - Směr: %1° - Kierunek: %1° - Dirección: %1° - Направление: %1° - - + + + Direction: %1° + Drehung: %1° + Direction: %1° + Směr: %1° + Kierunek: %1° + Dirección: %1° + Направление: %1° + Irány: %1° + + \ No newline at end of file diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index 72263c0b455..036dd5e9d94 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -7,7 +7,7 @@ class ACE_Head { icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitHead"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); @@ -78,7 +78,7 @@ class ACE_Torso { icon = PATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitBody"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); @@ -178,7 +178,7 @@ class ACE_ArmLeft { distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); @@ -334,7 +334,7 @@ class ACE_ArmRight { distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); @@ -487,7 +487,7 @@ class ACE_LegLeft { distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); @@ -628,7 +628,7 @@ class ACE_LegRight { distance = MEDICAL_ACTION_DISTANCE; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp index e77e276af2b..c2a60898f4f 100644 --- a/addons/medical/ACE_Medical_SelfActions.hpp +++ b/addons/medical/ACE_Medical_SelfActions.hpp @@ -14,7 +14,7 @@ class Medical { runOnHover = 1; class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitHead"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -84,7 +84,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitBody"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -149,7 +149,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -249,7 +249,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -345,7 +345,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -430,7 +430,7 @@ class Medical { icon = PATHTOF(UI\icons\medical_cross.paa); class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; + displayName = "$STR_ACE_Medical_Bandage"; distance = 2.0; condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; @@ -506,4 +506,4 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 097292d9ccf..5b5e0b6abd8 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -55,15 +55,6 @@ class ACE_Medical_Actions { animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; litter[] = {}; }; - class Tourniquet: Bandage { - displayName = "$STR_ACE_Medical_Apply_Tourniquet"; - displayNameProgress = "$STR_ACE_Medical_Applying_Tourniquet"; - items[] = {"ACE_tourniquet"}; - treatmentTime = 6; - callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); - condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo))); - litter[] = {}; - }; class BodyBag: Bandage { displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag"; displayNameProgress = "$STR_ACE_MEDICAL_PlacingInBodyBag"; @@ -80,6 +71,27 @@ class ACE_Medical_Actions { itemConsumed = 1; litter[] = {}; }; + class CheckPulse: Bandage { + displayName = ""; + displayNameProgress = ""; + treatmentLocations[] = {"All"}; + requiredMedic = 0; + treatmentTime = 2; + items[] = {}; + callbackSuccess = QUOTE(DFUNC(actionCheckPulse)); + callbackFailure = ""; + callbackProgress = ""; + animationPatient = ""; + animationCaller = ""; // TODO + itemConsumed = 0; + litter[] = {}; + }; + class CheckBloodPressure: CheckPulse { + callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure)); + }; + class CheckResponse: CheckPulse { + callbackSuccess = QUOTE(DFUNC(actionCheckResponse)); + }; }; class Advanced { diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 4d2f2db9be3..56e5a531ecc 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -117,4 +117,11 @@ class ACE_Settings { typeName = "BOOL"; value = 1; }; + class GVAR(painEffectType) { + displayName = "$STR_ACE_Medical_painEffectType"; + typeName = "SCALAR"; + value = 0; + values[] = {"$STR_ACE_Medical_painEffect_Flash", "$STR_ACE_Medical_painEffect_Chroma"}; + isClientSettable = 1; + }; }; diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp index bf96b6a2394..2fe5d0a9e53 100644 --- a/addons/medical/CfgEventHandlers.hpp +++ b/addons/medical/CfgEventHandlers.hpp @@ -47,11 +47,3 @@ class Extended_Local_EventHandlers { }; }; }; - -class Extended_Take_EventHandlers { - class CAManBase { - class ADDON { - take = QUOTE(call FUNC(itemCheck)); - }; - }; -}; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 4d7b23463a7..2b1f7c94685 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -645,7 +645,7 @@ class CfgVehicles { EGVAR(dragging,dragPosition[]) = {0,1.2,0}; EGVAR(dragging,dragDirection) = 0; class ACE_Actions { - class ACE_MainActions { + class ACE_MainActions { displayName = "$STR_ACE_Interaction_MainAction"; distance = 5; condition = QUOTE(true); @@ -696,10 +696,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_fieldDressing - { + class TransportItems { + class ACE_fieldDressing { name = "ACE_fieldDressing"; count = 1; }; @@ -711,10 +709,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_packingBandage - { + class TransportItems { + class ACE_packingBandage { name = "ACE_packingBandage"; count = 1; }; @@ -726,10 +722,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_elasticBandage - { + class TransportItems { + class ACE_elasticBandage { name = "ACE_elasticBandage"; count = 1; }; @@ -741,10 +735,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_tourniquet - { + class TransportItems { + class ACE_tourniquet { name = "ACE_tourniquet"; count = 1; }; @@ -756,10 +748,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_morphine - { + class TransportItems { + class ACE_morphine { name = "ACE_morphine"; count = 1; }; @@ -771,10 +761,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_atropine - { + class TransportItems { + class ACE_atropine { name = "ACE_atropine"; count = 1; }; @@ -786,10 +774,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_epinephrine - { + class TransportItems { + class ACE_epinephrine { name = "ACE_epinephrine"; count = 1; }; @@ -801,10 +787,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_PLASMA_IV; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_plasmaIV - { + class TransportItems { + class ACE_plasmaIV { name = "ACE_plasmaIV"; count = 1; }; @@ -817,10 +801,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BLOOD_IV; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_bloodIV - { + class TransportItems { + class ACE_bloodIV { name = "ACE_bloodIV"; count = 1; }; @@ -832,10 +814,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_SALINE_IV; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_salineIV - { + class TransportItems { + class ACE_salineIV { name = "ACE_salineIV"; count = 1; }; @@ -847,10 +827,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_quikClot - { + class TransportItems { + class ACE_quikClot { name = "ACE_quikclot"; count = 1; }; @@ -862,10 +840,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_personalAidKit - { + class TransportItems { + class ACE_personalAidKit { name = "ACE_personalAidKit"; count = 1; }; @@ -877,10 +853,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_surgicalKit - { + class TransportItems { + class ACE_surgicalKit { name = "ACE_surgicalKit"; count = 1; }; @@ -892,10 +866,8 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BODYBAG_DISPLAY; author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; - class TransportItems - { - class ACE_bodyBag - { + class TransportItems { + class ACE_bodyBag { name = "ACE_bodyBag"; count = 1; }; @@ -906,9 +878,42 @@ class CfgVehicles { class ACE_medicalSupplyCrate: NATO_Box_Base { scope = 2; accuracy = 1000; - displayName = "[ACE] Medical Supply Crate"; + displayName = "[ACE] Medical Supply Crate (Basic)"; model = PATHTOF(data\ace_medcrate.p3d); author = "$STR_ACE_Common_ACETeam"; + class TransportItems { + class ACE_fieldDressing { + name = "ACE_fieldDressing"; + count = 50; + }; + class ACE_morphine { + name = "ACE_morphine"; + count = 25; + }; + class ACE_epinephrine { + name = "ACE_epinephrine"; + count = 25; + }; + class ACE_bloodIV { + name = "ACE_bloodIV"; + count = 15; + }; + class ACE_bloodIV_500 { + name = "ACE_bloodIV_500"; + count = 15; + }; + class ACE_bloodIV_250 { + name = "ACE_bloodIV_250"; + count = 15; + }; + class ACE_bodyBag { + name = "ACE_bodyBag"; + count = 10; + }; + }; + }; + class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { + displayName = "[ACE] Medical Supply Crate (Advanced)"; class TransportItems { class ACE_fieldDressing { name = "ACE_fieldDressing"; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 51795d266c1..8fd58e25717 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -19,7 +19,6 @@ class CfgWeapons { }; }; - // @todo localize class ACE_ItemCore; class ACE_fieldDressing: ACE_ItemCore { scope = 2; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 1b0a38f1af4..309bb2a8887 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -21,14 +21,14 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; _unit setVariable ["tf_unable_to_use_radio", true, true]; _unit setVariable ["acre_sys_core_isDisabled", true, true]; - _unit setVariable ["acre_sys_core_globalVolume", 0.4]; + if (!isNil "acre_api_fnc_setGlobalVolume") then { [0.4^0.33] call acre_api_fnc_setGlobalVolume; }; } else { _unit setVariable ["tf_globalVolume", 1]; _unit setVariable ["tf_voiceVolume", 1, true]; _unit setVariable ["tf_unable_to_use_radio", false, true]; _unit setVariable ["acre_sys_core_isDisabled", false, true]; - _unit setVariable ["acre_sys_core_globalVolume", 1]; + if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; }; }; }; }] call ace_common_fnc_addEventHandler; @@ -153,11 +153,6 @@ GVAR(effectTimeBlood) = time; GVAR(lastHeartBeat) = time; GVAR(lastHeartBeatSound) = time; -// @todo, remove once parameters are set up -if (isNil QGVAR(level)) then { - GVAR(level) = 0; -}; - // HEARTRATE BASED EFFECTS [{ _heartRate = ACE_player getVariable [QGVAR(heartRate), 70]; @@ -172,8 +167,7 @@ if (isNil QGVAR(level)) then { // Pain effect _strength = ACE_player getVariable [QGVAR(pain), 0]; // _strength = _strength * (ACE_player getVariable [QGVAR(coefPain), GVAR(coefPain)]); @todo - GVAR(alternativePainEffect) = false; // @todo - if (GVAR(alternativePainEffect)) then { + if (GVAR(painEffectType) == 1) then { GVAR(effectPainCC) ppEffectEnable false; if ((ACE_player getVariable [QGVAR(pain), 0]) > 0 && {alive ACE_player}) then { _strength = _strength * 0.15; @@ -198,7 +192,7 @@ if (isNil QGVAR(level)) then { } else { GVAR(effectPainCA) ppEffectEnable false; if ((ACE_player getVariable [QGVAR(pain), 0]) > 0 && {alive ACE_player}) then { - _strength = _strength * 0.6; + _strength = _strength * 0.9; GVAR(effectPainCC) ppEffectEnable true; GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit 0.01; @@ -266,3 +260,8 @@ if (USE_WOUND_EVENT_SYNC) then { // Prevent all types of interaction while unconscious // @todo: probably remove this when CBA keybind hold key works properly ["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition); + +// Item Event Handler +["playerInventoryChanged", { + [ACE_player] call FUNC(itemCheck); +}] call EFUNC(common,addEventHandler); diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c18a116e318..f15b4ec109d 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -17,6 +17,7 @@ PREP(addToLog); PREP(addToTriageCard); PREP(addUnconsciousCondition); PREP(addUnloadPatientActions); +PREP(adjustPainLevel); PREP(canAccessMedicalEquipment); PREP(canTreat); PREP(canTreatCached); @@ -102,4 +103,7 @@ GVAR(IVBags) = []; call FUNC(parseConfigForInjuries); +GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; +GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; + ADDON = true; diff --git a/addons/medical/functions/fnc_adjustPainLevel.sqf b/addons/medical/functions/fnc_adjustPainLevel.sqf new file mode 100644 index 00000000000..7e6ce2d5f1a --- /dev/null +++ b/addons/medical/functions/fnc_adjustPainLevel.sqf @@ -0,0 +1,40 @@ +/* + * Author: PabstMirror + * Interface to allow external modules to safely adjust pain levels. + * + * Arguments: + * 0: The patient + * 1: Added ammount of pain (can be negative) + * + * Return Value: + * The new pain level + * + * Example: + * [guy, 0.5] call ace_medical_fnc_adjustPainLevel + * + * Public: Yes + */ +#include "script_component.hpp" + +private ["_pain"]; + +PARAMS_2(_unit,_addedPain); + +//Only run on local units: +if (!local _unit) exitWith {ERROR("unit is not local");}; + +//Ignore if medical system disabled: +if (GVAR(level) == 0) exitWith {}; + +_pain = _unit getVariable [QGVAR(pain), 0]; + +_pain = _pain + _addedPain; +if (GVAR(level) == 1) then {_pain = _pain min 1;}; //for basic, cap at 1 +_pain = _pain max 0; + +_unit setVariable [QGVAR(pain), _pain]; + +//Start up the vital watching (if not already running) +[_unit] call FUNC(addToInjuredCollection); + +_pain diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 2e0525f1a31..ecd2218c2be 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -47,8 +47,10 @@ if (_show) then { _allInjuryTexts = []; _genericMessages = []; - _partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select _selectionN; - _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; + if (GVAR(level) >= 2) then { + _partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select _selectionN; + _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; + }; if (_target getvariable[QGVAR(isBleeding), false]) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_BLEEDING", [1, 0.1, 0.1, 1]]; @@ -126,12 +128,22 @@ if (_show) then { { _selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x]; - if (_target getHitPointDamage _x > 0.1 && {_forEachIndex == _selectionN}) then { - // @todo localize - _allInjuryTexts pushBack [format ["%1 %2", - ["Lightly wounded", "Heavily wounded"] select (_target getHitPointDamage _x > 0.5), - ["head", "torso", "left arm", "right arm", "left leg", "right leg"] select _forEachIndex - ], [1,1,1,1]]; + if (_target getHitPointDamage _x > 0 && {_forEachIndex == _selectionN}) then { + _pointDamage = _target getHitPointDamage _x; + _severity = switch (true) do { + case (_pointDamage > 0.5): {localize "STR_ACE_Medical_HeavilyWounded"}; + case (_pointDamage > 0.1): {localize "STR_ACE_Medical_LightlyWounded"}; + default {localize "STR_ACE_Medical_VeryLightlyWounded"}; + }; + _part = localize ([ + "STR_ACE_Medical_Head", + "STR_ACE_Medical_Torso", + "STR_ACE_Medical_LeftArm", + "STR_ACE_Medical_RightArm", + "STR_ACE_Medical_LeftLeg", + "STR_ACE_Medical_RightLeg" + ] select _forEachIndex); + _allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]]; }; } forEach ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; }; diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index 6418d425e89..f6b26f76867 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -13,7 +13,7 @@ #include "script_component.hpp" -#define BLOODLOSSRATE_BASIC 0.4 +#define BLOODLOSSRATE_BASIC 0.2 private ["_totalBloodLoss","_tourniquets","_openWounds", "_value", "_cardiacOutput", "_internalWounds"]; // TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical). diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 074f8c41fa2..1632a8f55b7 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -private ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_damageReturn", "_hitPoints", "_typeOfDamage"]; +private ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_damageReturn", "_typeOfDamage"]; _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; @@ -32,8 +32,7 @@ if (typeName _projectile == "OBJECT") then { }; // If the damage is being weird, we just tell it to fuck off. -_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; -if !(_selection in (_hitSelections + [""])) exitWith {0}; +if !(_selection in (GVAR(SELECTIONS) + [""])) exitWith {0}; _damageReturn = _damage; if (GVAR(level) < 2) then { @@ -46,8 +45,7 @@ if (GVAR(level) >= 2) then { // lets use basic for the time being.. _damageReturn = _this call FUNC(handleDamage_basic); }; - - [_unit, _selection, _damage, _source, _projectile] call FUNC(handleDamage_caching); + _newDamage = _this call FUNC(handleDamage_caching); if (_damageReturn > 0.9) then { @@ -59,12 +57,6 @@ if (GVAR(level) >= 2) then { _minLethalDamage = GVAR(minLethalDamages) select _typeIndex; }; - _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; - _newDamage = _damage - (damage _unit); - if (_selection in _hitSelections) then { - _newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selection))); - }; - if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)} && {_selection in ["", "head", "body"]}) then { if ([_unit] call FUNC(setDead)) then { _damageReturn = 1; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 751896be443..ba0eb8af24f 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -25,21 +25,21 @@ _selectionName = _this select 1; _amountOfDamage = _this select 2; _sourceOfDamage = _this select 3; _typeOfProjectile = _this select 4; +_newDamage = _this select 5; // Most likely taking exessive fire damage. Lets exit. -if (isNull _sourceOfDamage && (_selectionName == "head" || isBurning _unit) && _typeOfProjectile == "" && vehicle _unit == _unit) exitwith { +if (isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) exitwith { 0 }; - _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); _part = [_selectionName] call FUNC(selectionNameToNumber); _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; // Sorting out the damage _damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; -_newDamage = _amountOfDamage - (_unit getHitPointDamage (_hitPoints select _part)); _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; + [_unit] call FUNC(handleDamage_advancedSetDamage); [_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds); diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index 74db6029d2a..f464ef5a943 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -16,9 +16,7 @@ private ["_unit", "_bodyStatus", "_headDamage", "_torsoDamage", "_handsDamage", "_legsDamage"]; _unit = _this select 0; -if (!local _unit) exitwith { - // execute only local -}; +if (!local _unit) exitwith {}; _bodyStatus = _unit getvariable [QGVAR(bodyPartStatus),[0,0,0,0,0,0]]; // ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"] diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 2986e1b2f73..aa9c2f61df2 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -42,15 +42,25 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo), -3]) + 2) then { _unit setVariable [QGVAR(damages), []]; _unit setVariable [QGVAR(structDamage), 0]; _unit setVariable [QGVAR(preventDeath), false]; + // Assign orphan structural damage to torso + [{ + private ["_unit", "_damagesum"]; + _unit = _this select 0; + _damagesum = (_unit getHitPointDamage "HitHead") + + (_unit getHitPointDamage "HitBody") + + (_unit getHitPointDamage "HitLeftArm") + + (_unit getHitPointDamage "HitRightArm") + + (_unit getHitPointDamage "HitLeftLeg") + + (_unit getHitPointDamage "HitRightLeg"); + if (_damagesum < 0.06 and damage _unit > 0.06 and alive _unit) then { + _unit setHitPointDamage ["HitBody", damage _unit]; + }; + }, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute); }; - -_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; -_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; - _newDamage = _damage - (damage _unit); -if (_selectionName in _hitSelections) then { - _newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selectionName))); +if (_selectionName in GVAR(SELECTIONS)) then { + _newDamage = _damage - (_unit getHitPointDamage (GVAR(HITPOINTS) select (GVAR(SELECTIONS) find _selectionName))); }; _damage = _damage - _newDamage; @@ -61,7 +71,7 @@ if (((velocity _unit) select 2 < -5) and (vehicle _unit == _unit)) then { _unit setVariable [QGVAR(isFalling), true]; }; if (_unit getVariable [QGVAR(isFalling), false] and !(_selectionName in ["", "leg_l", "leg_r"])) exitWith { - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selectionName))) max 0.01; + (_unit getHitPointDamage (GVAR(HITPOINTS) select (GVAR(SELECTIONS) find _selectionName))) max 0.01; }; if (_unit getVariable [QGVAR(isFalling), false]) then { _newDamage = _newDamage * 0.7; @@ -85,12 +95,12 @@ if (_selectionName != "" and !(_unit getVariable QGVAR(isFalling))) then { // Make entry unfindable _cache_projectiles set [_index, objNull]; _cache_projectiles pushBack _projectile; - _cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName)); + _cache_hitpoints pushBack (GVAR(HITPOINTS) select (GVAR(SELECTIONS) find _selectionName)); _cache_damages pushBack _newDamage; }; } else { _cache_projectiles pushBack _projectile; - _cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName)); + _cache_hitpoints pushBack (GVAR(HITPOINTS) select (GVAR(SELECTIONS) find _selectionName)); _cache_damages pushBack _newDamage; }; _unit setVariable [QGVAR(projectiles), _cache_projectiles]; @@ -109,30 +119,12 @@ if (_selectionName == "") then { }; }; - -// Assign orphan structural damage to torso -[{ - private ["_unit", "_damagesum"]; - _unit = _this select 0; - _damagesum = (_unit getHitPointDamage "HitHead") + - (_unit getHitPointDamage "HitBody") + - (_unit getHitPointDamage "HitLeftArm") + - (_unit getHitPointDamage "HitRightArm") + - (_unit getHitPointDamage "HitLeftLeg") + - (_unit getHitPointDamage "HitRightLeg"); - if (_damagesum < 0.06 and damage _unit > 0.06 and alive _unit) then { - _unit setHitPointDamage ["HitBody", damage _unit]; - }; -}, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute); - - if (_selectionName == "") then { _damage = _damage + (_unit getVariable QGVAR(structDamage)); } else { _damage = _damage + _newDamage; }; - // Leg Damage _legdamage = (_unit getHitPointDamage "HitLeftLeg") + (_unit getHitPointDamage "HitRightLeg"); if (_selectionName == "leg_l") then { @@ -143,9 +135,9 @@ if (_selectionName == "leg_r") then { }; if (_legdamage >= LEGDAMAGETRESHOLD1) then { - if (_unit getHitPointDamage "HitLegs" != 1) then {_unit setHitPointDamage ["HitLegs", 1]}; + _unit setHitPointDamage ["HitLegs", 1]; } else { - if (_unit getHitPointDamage "HitLegs" != 0) then {_unit setHitPointDamage ["HitLegs", 0]}; + _unit setHitPointDamage ["HitLegs", 0]; }; // @todo: force prone for completely fucked up legs. @@ -160,9 +152,9 @@ if (_selectionName == "hand_r") then { }; if (_armdamage >= ARMDAMAGETRESHOLD1) then { - if (_unit getHitPointDamage "HitHands" != 1) then {_unit setHitPointDamage ["HitHands", 1]}; + _unit setHitPointDamage ["HitHands", 1]; } else { - if (_unit getHitPointDamage "HitHands" != 0) then {_unit setHitPointDamage ["HitHands", 0]}; + _unit setHitPointDamage ["HitHands", 0]; }; // @todo: Drop weapon for full damage. @@ -174,7 +166,6 @@ if (_selectionName == "") then { _unit setVariable [QGVAR(pain), _pain min 1, true]; }; - // Unconsciousness if (_selectionName == "" and _damage >= UNCONSCIOUSNESSTRESHOLD and diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index ddd0b6c9209..98b2373c748 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -25,8 +25,8 @@ _damage = _this select 2; _source = _this select 3; _projectile = _this select 4; -_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; -_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; +_hitSelections = GVAR(SELECTIONS); +_hitPoints = GVAR(HITPOINTS); // Calculate change in damage. _newDamage = _damage - (damage _unit); @@ -34,18 +34,10 @@ if (_selectionName in _hitSelections) then { _newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selectionName))); }; - -// we want to move damage to another selection; have to do it ourselves. -// this is only the case for limbs, so this will not impact the killed EH. -if (_selectionName != (_this select 1)) then { - _unit setHitPointDamage [_hitPoints select (_hitSelections find _selectionName), _damage + _newDamage]; - _newDamage = 0; -}; -// ?????? -_damage = _damage + _newDamage; +//_damage = _damage + _newDamage; // Check for vehicle crash -if (vehicle _unit != _unit && !(vehicle _unit isKindOf "StaticWeapon") && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then { +if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isNull _source} && {_projectile == ""} && {_selectionName == ""}) then { if (missionNamespace getvariable [QGVAR(allowVehicleCrashDamage), true]) then { _selectionName = _hitSelections select (floor(random(count _hitSelections))); _projectile = "vehiclecrash"; @@ -54,10 +46,11 @@ if (vehicle _unit != _unit && !(vehicle _unit isKindOf "StaticWeapon") && {isNul // From AGM medical: // Exclude falling damage to everything other than legs; reduce structural damage. -if (((velocity _unit) select 2 < -5) && (vehicle _unit == _unit)) then { +if (((velocity _unit) select 2 < -5) && {(vehicle _unit == _unit)}) then { _unit setVariable [QGVAR(isFalling), True]; }; -if (_unit getVariable [QGVAR(isFalling), false] && !(_selectionName in ["", "leg_l", "leg_r"])) exitWith {}; + +if (_unit getVariable [QGVAR(isFalling), false] && {!(_selectionName in ["", "leg_l", "leg_r"])}) exitWith {}; if (_unit getVariable [QGVAR(isFalling), false]) then { _newDamage = _newDamage * 0.7; }; @@ -69,21 +62,16 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t // handle the cached damages 3 frames later [{ - private ["_args","_unit","_frameNo"]; + private ["_args", "_params"]; _args = _this select 0; - _unit = _args select 0; - _frameNo = _args select 1; - - if (diag_frameno > _frameNo + 2) then { - _cache_projectiles = _unit getVariable [QGVAR(cachedProjectiles), []]; - _cache_hitpoints = _unit getVariable [QGVAR(cachedHitPoints), []]; - _cache_damages = _unit getVariable [QGVAR(cachedDamages), []]; - _cache_params = _unit getVariable [QGVAR(cachedHandleDamageParams), []]; + + if (diag_frameno > (_args select 1) + 2) then { + _cache_params = (_args select 0) getVariable [QGVAR(cachedHandleDamageParams), []]; + _cache_damages = (_args select 0) getVariable QGVAR(cachedDamages); { - if (typeName _x == typeName "") then { - (_cache_params select _foreachIndex) call FUNC(handleDamage_advanced); - }; - }foreach _cache_projectiles; + _params = _x + [_cache_damages select _foreachIndex]; + _params call FUNC(handleDamage_advanced); + }foreach _cache_params; [(_this select 1)] call cba_fnc_removePerFrameHandler; }; }, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler; @@ -94,52 +82,54 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t _unit setVariable [QGVAR(cachedHandleDamageParams), []]; }; -// Make sure there's only one damaged selection per projectile per frame. -_cache_projectiles = _unit getVariable QGVAR(cachedProjectiles); -_cache_hitpoints = _unit getVariable QGVAR(cachedHitPoints); -_cache_damages = _unit getVariable QGVAR(cachedDamages); -_cache_params = _unit getVariable QGVAR(cachedHandleDamageParams); - // Caching of the damage events if (_selectionName != "") then { - + _cache_projectiles = _unit getVariable QGVAR(cachedProjectiles); + private ["_index","_otherDamage"]; + _index = _cache_projectiles find _projectile; // Check if the current projectile has already been handled once - if (_projectile in _cache_projectiles) then { - private ["_index","_otherDamage"]; - // if it has been handled, find the index in the cache - _index = _cache_projectiles find _projectile; - + if (_index >= 0) exitwith { + _cache_damages = _unit getVariable QGVAR(cachedDamages); // Find the previous damage this projectile has done _otherDamage = (_cache_damages select _index); // Take the highest damage of the two - if (_otherDamage > _newDamage) then { - _newDamage = 0; - } else { + if (_newDamage > _otherDamage) then { + _cache_params = _unit getVariable QGVAR(cachedHandleDamageParams); + _cache_hitpoints = _unit getVariable QGVAR(cachedHitPoints); + private ["_hitPoint", "_restore"]; // Restore the damage before the previous damage was processed _hitPoint = _cache_hitpoints select _index; _restore = ((_unit getHitPointDamage _hitPoint) - _otherDamage) max 0; _unit setHitPointDamage [_hitPoint, _restore]; - // Make entry unfindable and add the new damage cache - _cache_projectiles set [_index, objNull]; - _cache_projectiles pushBack _projectile; - _cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName)); - _cache_damages pushBack _newDamage; - _cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile]; + _cache_hitpoints set [_index, (_hitPoints select (_hitSelections find _selectionName))]; + _cache_damages set [_index, _newDamage]; + _cache_params set[_index, _this]; + + _unit setVariable [QGVAR(cachedProjectiles), _cache_projectiles]; + _unit setVariable [QGVAR(cachedHitPoints), _cache_hitpoints]; + _unit setVariable [QGVAR(cachedDamages), _cache_damages]; + _unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params]; }; - } else { - // This is an unhandled projectile - _cache_projectiles pushBack _projectile; - _cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName)); - _cache_damages pushBack _newDamage; - _cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile]; }; + + _cache_hitpoints = _unit getVariable QGVAR(cachedHitPoints); + _cache_damages = _unit getVariable QGVAR(cachedDamages); + _cache_params = _unit getVariable QGVAR(cachedHandleDamageParams); + + // This is an unhandled projectile + _cache_projectiles pushBack _projectile; + _cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName)); + _cache_damages pushBack _newDamage; + _cache_params pushBack _this; + + // Store the new cached values + _unit setVariable [QGVAR(cachedProjectiles), _cache_projectiles]; + _unit setVariable [QGVAR(cachedHitPoints), _cache_hitpoints]; + _unit setVariable [QGVAR(cachedDamages), _cache_damages]; + _unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params]; }; -// Store the new cached values -_unit setVariable [QGVAR(cachedProjectiles), _cache_projectiles]; -_unit setVariable [QGVAR(cachedHitPoints), _cache_hitpoints]; -_unit setVariable [QGVAR(cachedDamages), _cache_damages]; -_unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params]; +_newDamage; diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 1eebe038cdf..5933651e57e 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -52,10 +52,10 @@ _allPossibleInjuries = []; // Check if the damage is higher as the min damage for the specific injury if (_damage >= _minDamage && {_damage <= _maxDamage || _maxDamage < 0}) then { - _classType = _x select 0; + //_classType = _x select 0; _selections = _x select 1; - _bloodLoss = _x select 2; - _pain = _x select 3; + //_bloodLoss = _x select 2; + //_pain = _x select 3; // Check if the injury can be applied to the given selection name if ("All" in _selections || _selectionName in _selections) then { @@ -73,9 +73,7 @@ _allPossibleInjuries = []; }foreach _allInjuriesForDamageType; // No possible wounds available for this damage type or damage amount. -if (_highestPossibleSpot < 0) exitwith { - -}; +if (_highestPossibleSpot < 0) exitwith {}; // Administration for open wounds and ids _openWounds = _unit getvariable[QGVAR(openWounds), []]; @@ -125,7 +123,7 @@ _woundsCreated = []; _painToAdd = _painToAdd + (_toAddInjury select 3); }; }; -}foreach (_injuryTypeInfo select 0); +}foreach (_injuryTypeInfo select 0); // foreach damage thresholds _unit setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index fc13e19d29f..81c9ffea40c 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -28,9 +28,8 @@ if (_syncValues) then { }; _bloodVolume = (_unit getvariable [QGVAR(bloodVolume), 0]) + ([_unit] call FUNC(getBloodVolumeChange)); -if (_bloodVolume <= 0) then { - _bloodVolume = 0; -}; +_bloodVolume = _bloodVolume max 0; + _unit setvariable [QGVAR(bloodVolume), _bloodVolume, _syncValues]; // Set variables for synchronizing information across the net @@ -78,15 +77,11 @@ if (GVAR(level) == 1) then { // bleeding _blood = _unit getVariable [QGVAR(bloodVolume), 100]; - _blood = (_blood - 0.4 * (damage _unit) * _interval) max 0; - if (_blood != (_unit getVariable [QGVAR(bloodVolume), 100])) then { - _unit setVariable [QGVAR(bloodVolume), _blood, _syncValues]; - if (_blood <= 35 and !(_unit getVariable ["ACE_isUnconscious", false])) then { - [_unit, true] call FUNC(setUnconscious); - }; - if (_blood == 0) then { - [_unit] call FUNC(setDead); - }; + if (_blood <= 35 and !(_unit getVariable ["ACE_isUnconscious", false])) then { + [_unit, true] call FUNC(setUnconscious); + }; + if (_blood == 0) then { + [_unit] call FUNC(setDead); }; }; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index e3739016107..89ab5ee3b37 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -52,7 +52,7 @@ if (animationState _unit in ["ladderriflestatic","laddercivilstatic"]) then { }; if (vehicle _unit == _unit) then { if (primaryWeapon _unit == "") then { - _unit addWeapon "ACE_fakeWeapon"; + _unit addWeapon "ACE_FakePrimaryWeapon"; }; _unit selectWeapon (primaryWeapon _unit); _unit switchMove ""; @@ -67,7 +67,8 @@ _unit setUnitPos "DOWN"; [_unit, true] call EFUNC(common,disableAI); // So the AI does not get stuck, we are moving the unit to a temp group on its own. -[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); +//Unconscious units shouldn't be put in another group #527: +// [_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); [_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus); [_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation); @@ -114,7 +115,8 @@ _startingTime = time; [_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus); // Swhich the unit back to its original group - [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); + //Unconscious units shouldn't be put in another group #527: + // [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); [_unit, false] call EFUNC(common,disableAI); _unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP) diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index c1d2e3cc2d1..8547a36eae1 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,1018 +1,1451 @@  - - - Inject Atropine - Atropin injizieren - Inyectar Atropina - Ввести атропин - - - Inject Epinephrine - Epinephrine injizieren - Inyectar Epinefrina - Wtrzyknij adrenalinę - Aplikovat Adrenalin - Ввести андреналил - Adrénaline - Adrenalin - Injetar Epinefrina - Inietta Epinefrina - - - Inject Morphine - Morphin injizieren - Inyectar Morfina - Wstrzyknij morfinę - Aplikovat Morfin - Ввести морфин - Morphine - Morfium - Injetar Morfina - Inietta Morfina - - - Transfuse Blood - Bluttransfusion - Transfundir sangre - Przetocz krew - Transfúze krve - Перелить кровь - Transfusion - Infúzió - Transfundir Sangue - Effettua Trasfusione - - - Transfuse Plasma - Plasmatransfusion - Transfundir plasma - Перелить плазму - - - Transfuse Saline - Salzlösungtransfusion - Transfundir salino - Влить физраствор - - - Apply Tourniquet - Aderpresse anwenden - Aplicar torniquete - Наложить жгут - - - Bandage - Verbinden - Venda - Bandaż - Obvázat - Pansement - Benda - Kötözés - Atadura - Перевязать - - - Bandage Head - Kopf verbinden - Vendar la cabeza - Bandażuj głowę - Obvázat hlavu - Перевязать голову - Pansement Tête - Fej kötözése - Atar Cabeça - Benda la testa - - - Bandage Torso - Torso verbinden - Vendar el torso - Bandażuj tors - Obvázat hruď - Перевязать торс - Pansement Torse - Felsőtest kötözése - Atar Tronco - Benda il torso - - - Bandage Left Arm - Arm links verbinden - Vendar el brazo izquierdo - Bandażuj lewe ramię - Obvázat levou ruku - Перевязать левую руку - Pansement Bras Gauche - Bal kar kötözése - Atar Braço Esquerdo - Benda il braccio sinistro - - - Bandage Right Arm - Arm rechts verbinden - Vendar el brazo derecho - Bandażuj prawe ramię - Obvázat pravou ruku - Перевязать правую руку - Pansement Bras Droit - Jobb kar kötözése - Atar Braço Direito - Benda il braccio destro - - - Bandage Left Leg - Bein links verbinden - Vendar la pierna izquierda - Bandażuj lewą nogę - Obvázat levou nohu - Перевязать левую ногу - Pansement Jambe Gauche - Bal láb kötözése - Atar Perna Esquerda - Benda la gamba sinistra - - - Bandage Right Leg - Bein rechts verbinden - Vendar la pierna derecha - Bandażuj prawą nogę - Obvázat pravou nohu - Перевязать правую ногу - Pansement Jambe Droite - Jobb láb kötözése - Atar Perna Direita - Benda la gamba destra - - - Injecting Morphine ... - Morphin injizieren ... - Inyectando Morfina ... - Wstrzykiwanie morfiny ... - Aplikuju Morfin ... - Введение морфина... - Injection de Morphine... - Morfium beadása... - Injetando Morfina ... - Inietto la morfina ... - - - Injecting Epinephrine ... - Epinephrin injizieren ... - Inyectando Epinefrina ... - Wstrzykiwanie adrenaliny ... - Aplikuju Adrenalin ... - Введение андреналина ... - Injection d'Adrénaline ... - Adrenalin beadása... - Injetando Epinefrina ... - Inietto l'epinefrina ... - - - Injecting Atropine ... - Atropin injizieren ... - Inyectando Atropina ... - Введение атропина ... - - - Transfusing Blood ... - Bluttransfusion ... - Transfusión de sangre ... - Przetaczanie krwi ... - Probíhá transfúze krve ... - Переливание крови... - Transfusion Sanguine ... - Infúzió... - Transfundindo Sangue ... - Effettuo la trasfusione ... - - - Transfusing Saline ... - Sallösungtransfusion ... - Transfusión de salino ... - Вливание физраствора ... - - - Transfusing Plasma ... - Plasmatransfusion ... - Transfusión de plasma ... - Переливание плзмы ... - - - Bandaging ... - Verbinden ... - Vendando ... - Bandażowanie ... - Obvazuji ... - Pansement ... - Sto applicando la benda ... - Bekötözés... - Atando ... - Перевязывание ... - - - Applying Tourniquet ... - Setze Aderpresse an ... - Aplicando torniquete ... - Наложение жгута ... - - - Medical - Zdravotní - Médical - Sanitäter - Medico - Medyczne - Médico - Медик - Médico - - - Field Dressing - Notverband - Compresa de campaña - Бинтовая повязка - - - Packing Bandage - Verband - Vendaje compresivo - Компресионный пакет - - - Elastic Bandage - Elastische Binde - Vendaje elástico - Давящая повязка - - - QuikClot - QuikClot - QuikClot - QuickClot - - - Check Pulse - Puls überprüfen - Comprobar pulso - Проверить пульс - - - Check Blood Pressure - Blutdruck überprüfen - Comprobar presión arterial - Проверить кровяное давление - - - Triage Card - Verletztenanhängekarte - Tarjeta de triaje - Медкарта - - - Tourniquet - Aderpresse - Torniquete - Жгут - - - Remove Tourniquet - Entferne Aderpresse - Quitar torniquete - Снять жгут - - - Give Blood IV (1000ml) - Gebe Blut IV (1000ml) - Dar Sangre IV (1000ml) - Дать кровь для в/в вливания (1000 мл) - - - Give Blood IV (500ml) - Gebe Blut IV (500ml) - Dar Sangre IV (500ml) - Дать кровь для в/в вливания (500 мл) - - - Give Blood IV (250ml) - Gebe Blut IV (250ml) - Dar Sangre IV (250ml) - Дать кровь для в/в вливания (250 мл) - - - Give Plasma IV (1000ml) - Gebe Plasma IV (1000ml) - Dar Plasma IV (1000ml) - Дать плазму для в/в вливания (1000 мл) - - - Give Plasma IV (500ml) - Gebe Plasma IV (500ml) - Dar Plasma IV (500ml) - Дать плазму для в/в вливания (500 мл) - - - Give Plasma IV (250ml) - Gebe Plasma IV (250ml) - Dar Plasma IV (250ml) - Дать плазму для в/в вливания (250 мл) - - - Give Saline IV (1000ml) - Dar Salino IV (1000ml) - Дать физраствор для в/в вливания (1000 мл) - - - Give Saline IV (500ml) - Dar Salino IV (500ml) - Дать физраствор для в/в вливания (500 мл) - - - Give Saline IV (250ml) - Dar Salino IV (250ml) - Дать физраствор для в/в вливания (250 мл) - - - Minor - Gering - Menor - Незначительные травмы - - - Delayed - Retrasado - Груз 300 - - - Immediate - Inmediato - Помощь отложена - - - Deceased - Fallecido - Груз 200 - - - None - Ninguno - Нет - - - Normal breathing - Normales Atmen - Дыхание в норме - Respiración normal - Respiration Normale - Normalny oddech - - - No breathing - Atmet nicht - Дыхания нет - No respira - Apnée - Brak oddechu - - - Difficult breathing - Schweres Atmen - Дыхание затруднено - Dificultad para respirar - Difficultée Respiratoire - Trudności z oddychaniem - - - Almost no breathing - Atmet beinahe nicht - Дыхания почти нет - Casi sin respiración - Respiration Faible - Prawie brak oddechu - - - Bleeding - Blutet - Кровотечение - Sangrando - Seignement - Krwawienie zewnętrzne - - - In Pain - Unter Schmerzen - Испытывает боль - Con dolor - A De La Douleur - W bólu - - - Lost a lot of Blood - Hat eine große Menge Blut verloren - Большая кровопотеря - Mucha sangre perdida - A Perdu Bcp de Sang - Stracił dużo krwi - - - Tourniquet [CAT] - Aderpresse [CAT] - Жгут - Torniquete [CAT] - Garot [CAT] - Opaska uciskowa [CAT] - - - Receiving IV [%1ml] - Wiederbeleben IV [%1ml] - Reciviendo IV [%1ml] - Принимается переливание [%1 мл] - - - Bandage (Basic) - Verband (Basis) - Повязка (обычная) - Vendaje (Básico) - Bandage (Standard) - Bandaż (jałowy) - - - Used to cover a wound - Verwendet um die Wunde zu schützen - Для перевязки ран - Utilizado para cubrir una herida - Utilisé Pour Couvrir Une Blessure - Używany w celu przykrycia i ochrony miejsca zranienia - - - A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed. - Ein Verband, der aus einem besonderen Material besteht um die Wunde zu schützen, nachdem die Blutung gestoppt wurde. - Повязка, накладываемая поверх раны после остановки кровотечения. - Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar. - 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. - Opatrunek materiałowy, używany do przykrywania ran, zakładany na ranę po zatamowaniu krwawienia. - - - Packing Bandage - Verband - Тампонирующая повязка - Vendaje compresivo - Bandage Mèche - Bandaż (uciskowy) - - - Used to pack medium to large wounds and stem the bleeding - Wird verwendet, um mittel bis große Wunden zu verbinden und die Blutung 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. - 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. - Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran. - - - Bandage (Elastic) - Verband (Elastisch) - Повязка (давящая) - Vendaje (Elástico) - Bandage (Élastique) - Bandaż (elastyczny) - - - Bandage kit, Elastic - Verbandssatz, Elastisch - Давящая повязка - Kit de vendaje (Elástico) - Bandage Compressif Élastique - Zestaw bandaży elastycznych. - - - 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. - Elastyczna opaska podtrzymująca opatrunek oraz usztywniająca okolice stawów. - Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada - - - Tourniquet (CAT) - Aderpresse (CAT) - Жгут - Torniquete (CAT) - Garot (CAT) - Staza (typ. CAT) - - - Slows down blood loss when bleeding - Veringert den Blutverlust - Уменьшает кровопотерю при кровотечении. - Reduce la velocidad de pérdida de sangre - Ralentit le seignement - Zmniejsza ubytek krwi z kończyn w przypadku krwawienia. - - - 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. - Opaska zaciskowa CAT służy do tamowanie krwotoków w sytuacji zranienia kończyn z masywnym krwawieniem tętniczym lub żylnym. - - - Morphine autoinjector - Morphin Autoinjector - Морфин в пневмошприце - Morfina auto-inyectable - Auto-injecteur de Morphine - Autostrzykawka z morfiną - - - 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. - 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. - Organiczny związek chemiczny z grupy alkaloidów. Ma silne działanie przeciwbólowe. - - - Atropin autoinjector - Атропин в пневмошприце - Atropina auto-inyectable - Auto-injecteur d'Atropine - Autostrzykawka AtroPen - - - Used in NBC scenarios - Применяется для защиты от ОМП - Usado en escenarios NBQ - Utiliser en cas d'attaque CBRN - Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. - - - A drug used by the Military in NBC scenarios. - Препарат, используемый в войсках для защиты от оружия массового поражения. - Medicamento usado por militares en escenarios NBQ - Médicament utilisé par l'armée en cas d'attaque CBRN - Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. Środek stosowany w przypadku zagrożeń NBC. - - - Epinephrine autoinjector - Адреналин в пневмошприце - Epinefrina auto-inyectable - Auto-injecteur d'épinéphrine - Autostrzykawka EpiPen - - - 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 - Adrenalina. Zwiększa puls i przeciwdziała efektom wywołanym przez reakcje alergiczne - - - 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. - 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. - - - Plasma IV (1000ml) - Плазма для в/в вливания (1000 мл) - Plasma IV (1000ml) - Plasma Sanguin IV (1000ml) - Osocze IV (1000ml) - - - A volume-expanding blood supplement. - Дополнительный препарат, применяемый при возмещении объема крови. - Suplemento para expandir el volumen sanguíneo. - Supplement visant a remplacer les volume 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. - Składnik krwi, używany do zwiększenia jej objętości. - - - Plasma IV (500ml) - Плазма для в/в вливания (500 мл) - Plasma IV (500ml) - Plasma Sanguin IV (500ml) - Osocze IV (500ml) - - - Plasma IV (250ml) - Плазма для в/в вливания (250 мл) - Plasma IV (250ml) - Plasma Sanguin (250ml) - Osocze IV (250ml) - - - Blood IV (1000ml) - Кровь для переливания (1000 мл) - Sangre IV (1000ml) - Cullot Sanguin IV (1000ml) - Krew IV (1000ml) - - - 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é) - 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. - - - Blood IV (500ml) - Кровь для переливания (500 мл) - Sangre IV (500ml) - Cullot Sanguin IV (500ml) - Krew IV (500ml) - - - Blood IV (250ml) - Кровь для переливания (250 мл) - Sangre IV (250ml) - Cullot Sanguin IV (250ml) - Krew IV (250ml) - - - Saline IV (1000ml) - Физраствор для в/в вливания (1000 мл) - Solución Salina IV (1000ml) - solution Saline 0.9% IV (1000ml) - Solanka 0,9% IV (1000ml) - - - 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 - 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 - 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). - - - Saline IV (500ml) - Физраствор для в/в вливания (500 мл) - Salino IV (500ml) - Solution Saline 0.9% IV (500ml) - Solanka 0,9% IV (500ml) - - - Saline IV (250ml) - Физраствор для в/в вливания (250 мл) - Salino IV (250ml) - Solution Saline 0.9% IV (250ml) - Solanka 0,9% IV (250ml) - - - Basic Field Dressing (QuikClot) - Первичный перевязочный пакет (QuikClot) - Vendaje básico (QuickClot) - Bandage Regulier (Coagulant) - Opatrunek QuikClot - - - QuikClot bandage - Гемостатический пакет QuikClot - Vendaje QuikClot - Bandage coagulant - Podstawowy opatrunek stosowany na rany - - - Hemostatic bandage with coagulant that stops bleeding. - - Un bandage servant a coaguler les seignements mineur à moyen. - Proszkowy opatrunek adsorbcyjny przeznaczony do tamowania zagrażających życiu krwawień średniej i dużej intensywności. - Vendaje hemostático con coagulante que detiene el sangrado. - - - Personal Aid Kit - Аптечка - Botiquín de primeros auxilios - Équipement de support Vitale - Apteczka osobista - - - 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. - Zestaw środków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego - - - - - - - - - Surgical Kit - Хирургический набор - Kit quirúrgico - - - Surgical Kit for in field advanced medical treatment - Набор для хирургической помощи в полевых условиях - Kit quirúrgico para el tratamiento avanzado en el campo de batalla - - - Surgical Kit for in field advanced medical treatment - Набор для хирургической помощи в полевых условиях - Kit quirúrgico para el tratamiento avanzado en el campo de batalla - - - Bodybag - Мешок для трупов - Bolsa para cadáveres - - - A bodybag for dead bodies - Мешок для упаковки трупов - Una bolsa para cadáveres - - - A bodybag for dead bodies - Мешок для упаковки трупов - Una bolsa para cadáveres - - - Blood Pressure - Артериальное давление - Presión arterial - - - Checking Blood Pressure.. - Проверка артериального давления... - Comprobando presión arterial... - - - You checked %1 - Вы осмотрели раненого %1 - Examinando a %1 - - - You find a blood pressure of %2/%3 - Артериальное давление %2/%3 - La presión arterial es %2/%3 - - - You find a low blood pressure - Давление низкое - La presión arterial es baja - - - You find a normal blood pressure - Давление нормальное - La presión arterial es normal - - - You find a high blood pressure - Давление высокое - La presión arterial es alta - - - You find no blood pressure - Давления нет - No hay presión arterial - - - You fail to find a blood pressure - Артериальное давление не определяется - No puedes encontrar presión arterial - - - Pulse - Пульс - Pulso - - - Checking Heart Rate.. - Проверка пульса... - Comprobando ritmo cardíaco... - - - You checked %1 - Вы осмотрели раненого %1 - Examinando a %1 - - - You find a Heart Rate of %2 - Пульс %2 уд./мин. - El ritmo cardíaco es de %2 - - - You find a weak Heart Rate - Пульс слабый - El ritmo cardíaco es débil - - - You find a strong Heart Rate - Пульс учащенный - El ritmo cardíaco está acelerado - - - You find a normal Heart Rate - Пульс в норме - El ritmo cardíaco es bueno - - - You find no Heart Rate - Пульс не прощупывается - No tiene ritmo cardíaco - - - Response - Реакция - Respuesta - - - You check response of patient - Вы проверяете реакцию раненого - Compruebas si el paciente reacciona - - - %1 is responsive - %1 реагирует на раздражители - %1 ha reaccionado - - - %1 is not responsive - %1 не реагирует - %1 no reacciona - - - You checked %1 - Вы осмотрели раненого %1 - Examinas a %1 - - - Bandaged - Повязка наложена - Vendado - - - You bandage %1 (%2) - Вы перевязали раненого %1 (%2) - Aplicas vendaje a %1 en %2 - - - %1 is bandaging you - %1 перевязывает вас - %1 te está vendando - - - You start stitching injures from %1 (%2) - Вы зашиваете ранения от %1 (%2) - Estás suturando heridas de %1 en %2 - - - Stitching - Наложение швов - Suturando - - - You treat the airway of %1 - Вы интубируете раненого %1 - Estás intubando a %1 - - - Airway - Дыхательные пути - Vías aéreas - - - %1 is treating your airway - %1 проводит вам интубацию - %1 te está intubando - - - Drag - Ziehen - Arrastrar - Ciągnij - Táhnout - Тащить - Tracter - Húzás - Arrastar - Trascina - - - Carry - Tragen - Cargar - Nieś - Nést - Нести - Porter - Cipelés - Carregar - Trasporta - - - Release - Loslassen - Soltar - Połóż - Položit - Отпустить - Déposer - Elenged - Largar - Lascia - - - Load Patient Into - Patient Einladen - Cargar el paciente en - Załaduj pacjenta - Naložit pacianta do - Погрузить пациента в - Embarquer le Patient - Sebesült berakása - Carregar Paciente Em - Carica paziente nel - - - Unload Patient - Patient Ausladen - Descargar el paciente - Wyładuj pacjenta - Vyložit pacienta - Выгрузить пациента - Débarquer le Patient - Sebesült kihúzása - Descarregar Paciente - Scarica il paziente - - - Unload patient - Descargar el paciente - Выгрузить пациента - - - Load patient - Cargar el paciente en - Погрузить пациента - - - Place body in bodybag - Colocar cuerpo en bolsa para cadáveres - Поместить тело в мешок - - - Placing body in bodybag - Colocando cuerpo en bolsa para cadáveres - Помещение тела в мешок ... - - - %1 has bandaged patient - %1 has vendado al paciente - %1 перевязал пациента - - - %1 used %2 - %1 usó %2 - %1 применил %2 - - - %1 has given an IV - %1 has puesto una IV - %1 провел переливание - - - %1 applied a tourniquet - %1 aplicado torniquete - %1 наложил жгут - - + + + Inject Atropine + Atropin injizieren + Inyectar Atropina + Aplikovat atropin + Wstrzyknij atropinę + Injecter de l'atropine + Ввести атропин + Atropin beadása + + + Inject Epinephrine + Epinephrine injizieren + Inyectar Epinefrina + Wstrzyknij adrenalinę + Aplikovat adrenalin + Injecter de l'épinéphrine + Ввести адреналин + Epinefrin beadása + Injetar Epinefrina + Inietta Epinefrina + + + Inject Morphine + Morphin injizieren + Inyectar Morfina + Wstrzyknij morfinę + Aplikovat morfin + Ввести морфин + Morphine + Morfium beadása + Injetar Morfina + Inietta Morfina + + + Transfuse Blood + Bluttransfusion + Transfundir sangre + Przetocz krew + Transfúze krve + Перелить кровь + Transfusion + Infúzió (vér) + Transfundir Sangue + Effettua Trasfusione + + + Transfuse Plasma + Plasmatransfusion + Transfundir plasma + Transfúze plazmy + Przetocz osocze + Transfuser du Plasma + Перелить плазму + Infúzió (vérplazma) + + + Transfuse Saline + Salzlösungtransfusion + Transfundir salino + Transfúze fyziologický roztoku + Przetocz solankę + Transfuser de la Saline + Перелить физраствор + Infúzió (sós víz) + + + Apply Tourniquet + Aderpresse anwenden + Aplicar torniquete + Aplikovat škrtidlo + Załóż stazę + Appliquer un garrot + + + Bandage + Verbinden + Venda + Bandaż + Obvázat + Pansement + Benda + Kötözés + Atadura + Перевязать + + + Bandage Head + Kopf verbinden + Vendar la cabeza + Bandażuj głowę + Obvázat hlavu + Перевязать голову + Pansement Tête + Fej kötözése + Atar Cabeça + Benda la testa + + + Bandage Torso + Torso verbinden + Vendar el torso + Bandażuj tors + Obvázat hruď + Перевязать торс + Pansement Torse + Testtörzs kötözése + Atar Tronco + Benda il torso + + + Bandage Left Arm + Arm links verbinden + Vendar el brazo izquierdo + Bandażuj lewe ramię + Obvázat levou ruku + Перевязать левую руку + Pansement Bras Gauche + Bal kar kötözése + Atar Braço Esquerdo + Benda il braccio sinistro + + + Bandage Right Arm + Arm rechts verbinden + Vendar el brazo derecho + Bandażuj prawe ramię + Obvázat pravou ruku + Перевязать правую руку + Pansement Bras Droit + Jobb kar kötözése + Atar Braço Direito + Benda il braccio destro + + + Bandage Left Leg + Bein links verbinden + Vendar la pierna izquierda + Bandażuj lewą nogę + Obvázat levou nohu + Перевязать левую ногу + Pansement Jambe Gauche + Bal láb kötözése + Atar Perna Esquerda + Benda la gamba sinistra + + + Bandage Right Leg + Bein rechts verbinden + Vendar la pierna derecha + Bandażuj prawą nogę + Obvázat pravou nohu + Перевязать правую ногу + Pansement Jambe Droite + Jobb láb kötözése + Atar Perna Direita + Benda la gamba destra + + + Injecting Morphine ... + Morphin injizieren ... + Inyectando Morfina ... + Wstrzykiwanie morfiny ... + Aplikuji morfin ... + Введение морфина... + Injection de Morphine... + Morfium beadása ... + Injetando Morfina ... + Inietto la morfina ... + + + Injecting Epinephrine ... + Epinephrin injizieren ... + Inyectando Epinefrina ... + Wstrzykiwanie adrenaliny ... + Aplikuji adrenalin ... + Введение адреналина... + Injection d'Adrénaline ... + Epinefrin beadása ... + Injetando Epinefrina ... + Inietto l'epinefrina ... + + + Injecting Atropine ... + Atropin injizieren ... + Inyectando Atropina ... + Aplikuji atropin ... + Wstrzykiwanie atropiny ... + Injection d'Atropine ... + Введение атропина... + Atropin beadása ... + + + Transfusing Blood ... + Bluttransfusion ... + Transfusión de sangre ... + Przetaczanie krwi ... + Probíhá transfúze krve ... + Переливание крови... + Transfusion Sanguine ... + Infúzió vérrel ... + Transfundindo Sangue ... + Effettuo la trasfusione ... + + + Transfusing Saline ... + Sallösungtransfusion ... + Transfusión de salino ... + Probíha transfúze fyziologický roztoku ... + Przetaczanie solanki ... + Transfusion de saline ... + Переливание физраствора... + Infúzió sós vizzel ... + + + Transfusing Plasma ... + Plasmatransfusion ... + Transfusión de plasma ... + Probíha transfúze plazmy ... + Przetaczanie osocza ... + Transfusion de Plasma ... + Переливание плазмы... + Infúzió vérplazmával ... + + + Bandaging ... + Verbinden ... + Vendando ... + Bandażowanie ... + Obvazuji ... + Pansement ... + 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 ... + Наложение жгута... + Érszorító felhelyezése ... + + + Medical + Zdravotní + Médical + Sanitäter + Medico + Medyczne + Médico + Медик + Médico + Orvosi + + + Field Dressing + Verbandpäckchen + Compresa de campaña + Бинтовая повязка + Obinadlo + Bandaż jałowy + Bandage rapide + Zárókötszer + + + Packing Bandage + Mullbinde + Vendaje compresivo + Компресионный пакет + Bandaż uciskowy + Nyomókötszer + + + Elastic Bandage + Elastischer Verband + Vendaje elástico + Давящая повязка + Elastické obinadlo + Bandaż elastyczny + Pansement élastique + Rögzitő kötszer + + + QuikClot + QuikClot + QuikClot + QuickClot + Opatrunek QuikClot + QuikClot + Hémostatique + QuikClot + + + Check Pulse + Puls überprüfen + Comprobar pulso + Проверить пульс + Zkontrolovat pulz + Sprawdź tętno + Vérifier les pulsations + Pulzus ellenőrzése + + + Check Blood Pressure + Blutdruck überprüfen + Comprobar presión arterial + Проверить давление + Zkontrolovat krevní tlak + Sprawdź ciśnienie krwi + Vérification de la Tension + Vérnyomás megmérése + + + Triage Card + Verletztenanhängekarte + Tarjeta de triaje + Медкарта + Karta segregacyjna + Karta Triage + Carte de Triage + Orvosi lap + + + Tourniquet + Aderpresse + Torniquete + Жгут + Škrtidlo + Staza + Garrot + Érszorító + + + Remove Tourniquet + Aderpresse entfernen + Quitar torniquete + Снять жгут + Sundat škrtidlo + Zdejmij stazę + Enlever le Garrot + Érszorító leszedése + + + Give Blood IV (1000ml) + Bluttransfusion IV (1000ml) + Dar Sangre IV (1000ml) + Дать кровь для в/в вливания (1000 мл) + Podaj krew IV (1000ml) + Administrer du Sang en IV (1000ml) + Podat krev. transfúzi (1000ml) + Vér adása intravénásan (1000ml) + + + Give Blood IV (500ml) + Bluttransfusion IV (500ml) + Dar Sangre IV (500ml) + Дать кровь для в/в вливания (500 мл) + Podaj krew IV (500ml) + Administrer du Sang en IV (500ml) + Podat krev. transfúzi (500ml) + Vér adása intravénásan (500ml) + + + Give Blood IV (250ml) + Bluttransfusion IV (250ml) + Dar Sangre IV (250ml) + Дать кровь для в/в вливания (250 мл) + Podaj krew IV (250ml) + Administrer du Sang en IV (250ml) + Podat krev. transfúzi (250ml) + Vér adása intravénásan (250ml) + + + Give Plasma IV (1000ml) + Plasmatransfusion IV (1000ml) + Dar Plasma IV (1000ml) + Дать плазму для в/в вливания (1000 мл) + Podaj osocze IV (1000ml) + Administrer du Plasma en IV (1000ml) + Podat plazmu (1000ml) + Vérplazma adása intravénásan (1000ml) + + + Give Plasma IV (500ml) + Plasmatransfusion IV (500ml) + Dar Plasma IV (500ml) + Дать плазму для в/в вливания (500 мл) + Podaj osocze IV (500ml) + Administrer du Plasma en IV (500ml) + Podat plazmu (500ml) + Vérplazma adása intravénásan (500ml) + + + Give Plasma IV (250ml) + Plasmatransfusion IV (250ml) + Dar Plasma IV (250ml) + Дать плазму для в/в вливания (250 мл) + Podaj osocze IV (250ml) + Administrer du Plasma en IV (250ml) + Podat plazmu (250ml) + Vérplazma adása intravénásan (250ml) + + + Give Saline IV (1000ml) + Kochsaltzlösung IV (1000ml) + Dar Salino IV (1000ml) + Дать физраствор для в/в вливания (1000 мл) + Podaj solankę IV (1000ml) + Administrer de la Solution Saline en IV (1000ml) + Podaz fyz. roztok (1000ml) + Sós víz adása intravénásan (1000ml) + + + Give Saline IV (500ml) + Kochsaltzlösung IV (500ml) + Dar Salino IV (500ml) + Дать физраствор для в/в вливания (500 мл) + Podaj solankę IV (500ml) + Administrer de la Solution Saline en IV (500ml) + Podaz fyz. roztok (500ml) + Sós víz adása intravénásan (500ml) + + + Give Saline IV (250ml) + Kochsaltzlösung IV (250ml) + Dar Salino IV (250ml) + Дать физраствор для в/в вливания (250 мл) + Podaj solankę IV (250ml) + Administrer de la Solution Saline en IV (250ml) + Podaz fyz. roztok (250ml) + Sós víz adása intravénásan (250ml) + + + Minor + Gering + Menor + Незначительная + Normalny + Mineur + Minimální + Enyhe + + + Delayed + Retrasado + Груз 300 + Opóźniony + Différé + Verzögert + Odložitelný + Késleltetett + + + Immediate + Inmediato + Помощь отложена + Natychmiastowy + Urgence Immédiate + Sofort + Okamžiý + Azonnali + + + Deceased + Fallecido + Груз 200 + Nie żyje + Décédé + Verstorben + Mrtvý + Elhalálozott + + + None + Ninguno + Нет + Brak + Aucun + Keine + Nic + Semmi + + + Normal breathing + Дыхание в норме + Respiración normal + Respiration Normale + Normalny oddech + Normale Atmung + Dýchá normálně + Normális légzés + + + No breathing + Keine Atmung + Дыхание отсутствует + No respira + Aucune Respiration + Brak oddechu + Nedýchá + Nincs légzés + + + Difficult breathing + Дыхание затруднено + Dificultad para respirar + Difficultée Respiratoire + Trudności z oddychaniem + Schwere Atmung + Dýchá s obtížemi + Nehéz légzés + + + Almost no breathing + Fast keine Atmung + Дыхание очень слабое + Casi sin respiración + Respiration Faible + Prawie brak oddechu + Skoro nedýchá + Alig van légzés + + + Bleeding + Blutet + Кровотечение + Sangrando + Saignement + Krwawienie zewnętrzne + Krvácí + Vérzik + + + In Pain + Hat Schmerzen + Испытывает боль + Con dolor + Ressent de la Douleur + W bólu + V bolestech + Fájdalom alatt + + + Lost a lot of Blood + Hat eine große Menge Blut verloren + Большая кровопотеря + Mucha sangre perdida + A Perdu Bcp de Sang + Stracił dużo krwi + Ztratil hodně krve + Sok vért vesztett + + + Tourniquet [CAT] + Aderpresse [CAT] + Жгут + Torniquete [CAT] + Garrot [CAT] + Staza [typ. CAT] + Škrtidlo [CAT] + Érszorító [CAT] + + + Receiving IV [%1ml] + Erhalte IV [%1ml] + Reciviendo IV [%1ml] + Принимается переливание [%1 мл] + Otrzymywanie IV [%1ml] + Transfusion en IV [%1ml] + Přijímání transfúze [%1ml] + Infúzióra kötve [%1ml] + + + Bandage (Basic) + Bandage (Standard) + Повязка (обычная) + Vendaje (Básico) + Bandage (Standard) + Bandaż (jałowy) + Bandáž (standartní) + Kötszer (Általános) + + + Used to cover a wound + Для перевязки ран + Utilizado para cubrir una herida + Utilisé Pour Couvrir Une Blessure + Używany w celu przykrycia i ochrony miejsca zranienia + Verwendet, um Wunden abzudecken + Sebesülések befedésére alkalmas + + + A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed. + Ein Verband, der aus einem besonderen Material besteht um die Wunde zu schützen, nachdem die Blutung gestoppt wurde. + Повязка, накладываемая поверх раны после остановки кровотечения. + Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar. + Bandage fait d'un matériel spécial utilisé pour couvrir une blessure, qui peut etre appliqué dès que le saignement a été stoppé. + Opatrunek materiałowy, używany do przykrywania ran, zakładany na ranę po zatamowaniu krwawienia. + Egy különleges anyagú kötszer sebek betakarására, amelyet a vérzés elállítása után helyeznek fel. + + + Packing Bandage + Mullbinde + Тампонирующая повязка + Vendaje compresivo + Bandage Mèche + Bandaż (uciskowy) + Nyomókötszer + + + Used to pack medium to large wounds and stem the bleeding + Verwendet, um mittlere bis große Wunden abzudecken und Blutungen zu stoppen + Для тампонирования ран среднего и большого размера и остановки кровотечения. + Se utiliza para vendar heridas medianas o grandes y detener el sangrado + Utilisé pour 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. + Közepestől nagyig terjedő sebek betakarására és vérzés elállítására használt kötszer + + + 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. + 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. + Egy kötszerfajta, melyet a sebek nyomására használnak a vérzés elállítása és sebgyógyulás érdekében. A nyomókötés egy lehetőség nagyobb polytraumatikus sérülések esetén. + + + Bandage (Elastic) + Bandage (Elastisch) + Повязка (давящая) + Vendaje (Elástico) + Bandage (Élastique) + Bandaż (elastyczny) + Bandáž (elastická) + Rögzító kötszer + + + Bandage kit, Elastic + Elastische Binde (Kompressionsbinde) + Давящая повязка + Kit de vendaje (Elástico) + Bandage Compressif Élastique + Zestaw bandaży elastycznych. + Rugalmas kötszercsomag, "rögzítő" + + + Allows an even compression and extra support to the injured area. + + Давящая повязка обеспечивает равномерное сжатие и дополнительную поддержку поврежденной области + 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 + Egyenletes nyomást és támogatást biztosít a sebesült felületnek. + + + Tourniquet (CAT) + Aderpresse (CAT) + Жгут + Torniquete (CAT) + Garrot (CAT) + Staza (typ. CAT) + Škrtidlo (CAT) + Érszorító (CAT) + + + Slows down blood loss when bleeding + Замедляет кровопотерю при кровотечении + Reduce la velocidad de pérdida de sangre + Ralentit le saignement + Zmniejsza ubytek krwi z kończyn w przypadku krwawienia. + Verringert den Blutverlust während einer Blutung + Lelassítja a vérvesztést vérzés esetén + + + A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood. + Жгут используется для прижатия сосудов к костным выступам, которое приводит к остановке или значительному уменьшению кровотечения + Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre + Un dispositif permettant de compresser les artères et veines afin de 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. + Egy szűkítőeszköz, mely a vénás és artériás nyomás keringés helyi összenyomására szolgál, ezzel lelassítva vagy megállítva az adott területen a vérkeringést. Ez csökkenti a vérvesztés mértékét. + + + Morphine autoinjector + Morphium Autoinjektor + Морфин в пневмошприце + Morfina auto-inyectable + Auto-injecteur de Morphine + Autostrzykawka z morfiną + Autoinjektor morfin + Morfium autoinjektor + + + 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 + Utilisé pour réduire les douleurs modérées à sévères. + Morfina. Ma silne działanie przeciwbólowe. + Mérsékelttől erős fájdalomig, ellene alkalmazandó termék + + + 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 à 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 + Egy fájdalomcsillapító anyag, jellemzően mérsékelt vagy erős fájdalom esetén alkalmazandó. + + + Atropin autoinjector + Атропин в пневмошприце + Atropina auto-inyectable + Auto-injecteur d'Atropine + Autostrzykawka AtroPen + Atropin Autoinjektor + Autoinjektor atropin + Atropin autoinjektor + + + Used in NBC scenarios + Применяется для защиты от ОМП + Usado en escenarios NBQ + Utilisé en cas d'attaque CBRN + Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. + Verwendet bei ABC Kontamination + NBK helyzetek esetén használandó + + + A drug used by the Military in NBC scenarios. + Препарат, используемый в войсках для защиты от оружия массового поражения. + Medicamento usado por militares en escenarios NBQ + Médicament utilisé par l'armée en cas d'attaque CBRN + Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. Środek stosowany w przypadku zagrożeń NBC. + Ein Medikament, das vom Militär bei ABC Kontamination verwendet wird. + Egy instabil alkaloid, NBK helyzetek esetén a katonai szervezetek veszik használatba. + + + Epinephrine autoinjector + Адреналин в пневмошприце + Epinefrina auto-inyectable + Auto-injecteur d'épinéphrine + Autostrzykawka EpiPen + Epiniphrin Autoinjektor + Autoinjektor adrenalin + Epinefrin autoinjektor + + + 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é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 + Növeli a szívverést és ellenzi az allergiás reakciók hatásait + + + 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. + 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. + + + Plasma IV (1000ml) + Плазма для в/в вливания (1000 мл) + Plasma IV (1000ml) + Plasma Sanguin IV (1000ml) + Osocze IV (1000ml) + Plasma IV (1000ml) + Vérplazma-infúzió (1000ml) + + + A volume-expanding blood supplement. + Дополнительный препарат, применяемый при возмещении объема крови. + Suplemento para expandir el volumen sanguíneo. + Supplément visant à remplacer les volumes sanguin + Składnik krwi, używany do zwiększenia jej objętości. + Egy térfogatnövelő vérkiegészítmény. + + + A volume-expanding blood supplement. + Дополнительный препарат, применяемый при возмещении объема крови. + Suplemento para expandir el volumen sanguíneo. + Supplément visant à remplacer le volume sanguin et remplace les plaquettes. + Składnik krwi, używany do zwiększenia jej objętości. + Egy térfogatnövelő vérkiegészítmény. + + + Plasma IV (500ml) + Плазма для в/в вливания (500 мл) + Plasma IV (500ml) + Plasma Sanguin IV (500ml) + Osocze IV (500ml) + Plasma IV (500ml) + Vérplazma-infúzió (500ml) + + + Plasma IV (250ml) + Плазма для в/в вливания (250 мл) + Plasma IV (250ml) + Plasma Sanguin (250ml) + Osocze IV (250ml) + Plasma IV (250ml) + Vérplazma-infúzió (250ml) + + + Blood IV (1000ml) + Кровь для переливания (1000 мл) + Sangre IV (1000ml) + Cullot Sanguin IV (1000ml) + Krew IV (1000ml) + Blut IV (1000ml) + Vér-infúzió (1000ml) + + + Blood IV, for restoring a patients blood (keep cold) + Пакет крови для возмещения объема потерянной крови (хранить в холодильнике) + Sangre intravenosa, para restarurar el volumen sanguíneo (mantener frío) + 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 + Vér-infúzió, intravénás bejuttatásra egy páciensnek (hidegen tárolandó) + + + O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. + Кровь I группы, резус-отрицательная, применяется по жизненным показаниям для возмещения объема потерянной крови на догоспитальном этапе оказания медицинской помощи. + 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. + + + Blood IV (500ml) + Кровь для переливания (500 мл) + Sangre IV (500ml) + Cullot Sanguin IV (500ml) + Krew IV (500ml) + Blut IV (500ml) + Vér-infúzió (500ml) + + + Blood IV (250ml) + Кровь для переливания (250 мл) + Sangre IV (250ml) + Cullot Sanguin IV (250ml) + Krew IV (250ml) + Blut IV (250ml) + Vér-infúzió (250ml) + + + Saline IV (1000ml) + Физраствор для в/в вливания (1000 мл) + Solución Salina IV (1000ml) + Solution Saline 0.9% IV (1000ml) + Solanka 0,9% IV (1000ml) + Kochsalzlösung (1000ml) + 0,9%-os sósvíz-infúzió (1000ml) + + + Saline IV, for restoring a patients blood + Пакет физраствора для возмещения объема потерянной крови + Solución salina intravenosa, para restaurar el volumen sanguíneo + 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 + 0,9%-os sósvíz-infúzió, a páciens vérmennyiségének helyreállítására + + + 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 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). + Egy orvosi térfogat-helyreállító készítmény, melyet intravénás módon lehet a szervezetbe juttatni. + + + Saline IV (500ml) + Физраствор для в/в вливания (500 мл) + Salino IV (500ml) + Solution Saline 0.9% IV (500ml) + Solanka 0,9% IV (500ml) + Kochsalzlösung (500ml) + 0,9%-os sósvíz-infúzió (500ml) + + + Saline IV (250ml) + Физраствор для в/в вливания (250 мл) + Salino IV (250ml) + Solution Saline 0.9% IV (250ml) + Solanka 0,9% IV (250ml) + Kochsalzlösung (250ml) + 0,9%-os sósvíz-infúzió (250ml) + + + Basic Field Dressing (QuikClot) + Первичный перевязочный пакет (QuikClot) + Vendaje básico (QuickClot) + Bandage Regulier (Coagulant) + Podstawowy pakiet opatrunkowy (QuikClot) + Verbandpäckchen(Gerinnungsmittel) + Általános zárókötszer (QuikClot) + + + QuikClot bandage + Гемостатический пакет QuikClot + Vendaje QuikClot + Bandage coagulant + Hemostatyczny pakiet QuikClot. Podstawowy opatrunek stosowany na rany. + Bandage mit Gerinnungsmittel + QuikClot kötszer + + + Hemostatic bandage with coagulant that stops bleeding. + Медицинский коагулянт для экстренной остановки кровотечения + 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. + Hemostatikus kötszer egy vérzésgátló anyaggal. + + + Personal Aid Kit + Аптечка + Botiquín de primeros auxilios + Équipement de support vital + Apteczka osobista + Persönliches Verbandpäckchen + Elsősegélycsomag + + + Includes various treatment kit needed for stitching or advanced treatment + Содержит различные материалы и инструменты для зашивания ран и оказания специальной медпомощи. + Incluye material médico para tratamientos avanzados + Inclue du matériel medical pour les traitements avancés, tel les points de suture. + Zestaw środków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego + Beinhaltet medizinisches Material für fortgeschrittene Behandlung und zum Nähen. + Változatos segédfelszereléseket tartalmaz sebvarráshoz és haladó elsősegélynyújtáshoz + + + + + + + W znacznym stopniu poprawia stan pacjenta + + + Surgical Kit + Trousse chirurgicale + Хирургический набор + Kit quirúrgico + Zestaw do szycia ran + Operationsset + Sebészeti készlet + + + Surgical Kit for in field advanced medical treatment + 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 + Operationsset für fortgeschrittene medizinische Feldversorgung + Sebészeti készlet komplex orvosi feladatok terepen való ellátására + + + Surgical Kit for in field advanced medical treatment + Набор для хирургической помощи в полевых условиях + 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 + Sebészeti készlet komplex orvosi feladatok terepen való ellátására + + + Bodybag + Sac à corps + Мешок для трупов + Bolsa para cadáveres + Worek na zwłoki + Leichensack + Hullazsák + + + A bodybag for dead bodies + Housse de transport des corps + Мешок для упаковки трупов + Una bolsa para cadáveres + Worek do pakowania zwłok + Ein Leichensack für Tote + Egy hullazsák a holttestek számára + + + A bodybag for dead bodies + Housse de transport des corps + Мешок для упаковки трупов + Una bolsa para cadáveres + Worek do pakowania zwłok + Ein Leichensack für Tote + Egy hullazsák a holttestek számára + + + Blood Pressure + Tension artérielle + Артериальное давление + Presión arterial + Ciśnienie krwi + Blutdruck + Vérnyomás + + + Checking Blood Pressure.. + Mesure de la tension ... + Проверка артериального давления... + Comprobando presión arterial... + Sprawdzanie ciśnienia krwi... + Blutdruck kontrollieren... + Vérnyomás megmérése... + + + You checked %1 + Vous diagnostiquez %1 + Вы осмотрели раненого %1 + Examinando a %1 + Zbadałeś %1 + Kontrolliert %1 + A %1 ellenőrizve + + + You find a blood pressure of %2/%3 + Vous avez trouvé une tension de %2/%3 + Артериальное давление %2/%3 + La Presión Arterial es %2/%3 + A vérnyomás %2/%3 + + + You find a low blood pressure + Tension basse + Давление низкое + La presión arterial es baja + Wyczuwasz niskie ciśnienie krwi + Blutdruck ist niedrig + A vérnyomás alacsony + + + You find a normal blood pressure + Tension normale + Давление нормальное + La presión arterial es normal + Wyczuwasz normalne ciśnienie krwi + Blutdruck ist normal + A vérnyomás normális + + + You find a high blood pressure + Tension haute + Давление высокое + La presión arterial es alta + Wyczuwasz wysokie ciśnienie krwi + Blutdruck ist hoch + A vérnyomás magas + + + You find no blood pressure + Pas de tension + Давления нет + No hay presión arterial + Nie wyczuwasz ciśnienia krwi + Patient hat keinen Blutdruck + Nem észlelhető vérnyomás + + + You fail to find a blood pressure + Vous n'avez pas pu mesurer de tension + Артериальное давление не определяется + No puedes encontrar presión arterial + Nie udało Ci się sprawdzić ciśnienia krwi + Blutdruck konnte nicht gefunden werden + Nem sikerült a vérnyomás megmérése + + + Pulse + Пульс + Pouls + Pulso + Tętno + Puls + Pulzus + + + Checking Heart Rate.. + Vérification du rythme cardiaque ... + Проверка пульса... + Comprobando ritmo cardíaco... + Sprawdzanie tętna... + Kontrolliere Herzfrequenz + Szívverés-szám mérése... + + + You checked %1 + Вы осмотрели раненого %1 + Vous examinez %1 + Examinando a %1 + Zbadałeś %1 + Kontrolliertt %1 + A %1 ellenőrizve + + + You find a Heart Rate of %2 + Rythme carquiaque de %2 + Пульс %2 уд./мин. + El ritmo cardíaco es de %2 + Wyczuwasz tętno o wartości %2 + Herzfrequenz ist %2 + A szívverés-szám %2 + + + You find a weak Heart Rate + Rythme cardiaque faible + Пульс слабый + El ritmo cardíaco es débil + Wyczuwasz słabe tętno + Schwacher Puls + A szívverés-szám alacsony + + + You find a strong Heart Rate + Rythme cardiaque élevé + Пульс учащенный + El ritmo cardíaco está acelerado + Wyczuwasz silne tętno + Starker Puls + A szívverés-szám magas + + + You find a normal Heart Rate + Rythme cardiaque normal + Пульс в норме + El ritmo cardíaco es bueno + Wyczuwasz normalne tętno + Normaler Puls + A szívverés-szám normális + + + You find no Heart Rate + Pas de rythme cardiaque + Пульс не прощупывается + No tiene ritmo cardíaco + Wyczuwasz brak tętna + Kein Puls gefunden + Nem észlelhető szívverés + + + Response + Etat de Conscience + Реакция + Respuesta + Przytomność + Ansprechbarkeit + Reagálóképesség + + + You check response of patient + Vous vérifiez la réponse du patient + Вы проверяете реакцию раненого + Compruebas si el paciente reacciona + Sprawdzasz przytomność pacjenta + Du prüfst ob der Patient ansprechbar ist + Ellenőrzöd a páciens reagálóképességét + + + %1 is responsive + %1 реагирует на раздражители + %1 est conscient + %1 ha reaccionado + %1 jest przytomny + %1 ist anprechbar + %1 reakcióképes + + + %1 is not responsive + %1 не реагирует + %1 est inconscient + %1 no reacciona + %1 jest nieprzytomny + %1 ist nicht ansprechbar + %1 nem reagál + + + You checked %1 + Вы осмотрели раненого %1 + Vous avez examiné %1 + Examinas a %1 + Zbadałeś %1 + Du versucht %1 anzusprechen + Megnézted %1-t + + + Bandaged + Bandé + Повязка наложена + Vendado + Zabandażowano + Bekötözve + + + You bandage %1 (%2) + Vous bandez %1 (%2) + Вы перевязали раненого %1 (%2) + Aplicas vendaje a %1 en %2 + Bandażujesz %1 (%2) + Bekötözöd %1-t (%2) + + + %1 is bandaging you + %1 vous bande + %1 перевязывает вас + %1 te está vendando + %1 bandażuje Ciebie + %1 bekötöz téged + + + 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) + Elkezded összevarni %1 sérüléseit (%2) + + + Stitching + Наложение швов + Sutures + Suturando + Szycie + Összevarrás + + + You treat the airway of %1 + Вы интубируете раненого %1 + Vous traitez les voies respiratoires de %1 + Estás intubando a %1 + Udrażniasz drogi oddechowe %1 + Kezeled %1 légútját + + + Airway + Дыхательные пути + Vías aéreas + Drogi oddechowe + Atemwege + Voies respiratoires + Légút + + + %1 is treating your airway + %1 проводит вам интубацию + %1 traite vos voies respiratoires + %1 te está intubando + %1 udrażnia Twoje drogi oddechowe + %1 kezeli a légútadat + + + Drag + Ziehen + Arrastrar + Ciągnij + Táhnout + Тащить + Trainer + Húzás + Arrastar + Trascina + + + Carry + Tragen + Cargar + Nieś + Nést + Нести + Porter + Cipelés + Carregar + Trasporta + + + Release + Loslassen + Soltar + Połóż + Položit + Отпустить + Déposer + Elengedés + Largar + Lascia + + + Load Patient Into + Patient Einladen + Cargar el paciente en + Załaduj pacjenta + Naložit pacianta do + Погрузить пациента в + Embarquer le Patient + Sebesült berakása + Carregar Paciente Em + Carica paziente nel + + + Unload Patient + Patient Ausladen + Descargar el paciente + Wyładuj pacjenta + Vyložit pacienta + Выгрузить пациента + Débarquer le Patient + Sebesült kihúzása + Descarregar Paciente + Scarica il paziente + + + Unload patient + Descargar el paciente + Выгрузить пациента + Wyładuj pacjenta + Débarquer le Patient + Sebesült kihúzása + + + Load patient + Cargar el paciente en + Погрузить пациента + Załaduj pacjenta + Embarquer le Patient + Sebesült berakása + + + Place body in bodybag + Colocar cuerpo en bolsa para cadáveres + Поместить тело в мешок для трупов + Zapakuj ciało do worka na zwłoki + Mettre le corps dans la housse mortuaire + Test hullazsákba helyezése + + + Placing body in bodybag + Colocando cuerpo en bolsa para cadáveres + Упаковка тела + Pakowanie ciała do worka na zwłoki + Placement du corps dans la housse + Test hullazsákba helyezése ... + + + %1 has bandaged patient + %1 has vendado al paciente + %1 перевязал пациента + %1 zabandażował pacjenta + %1 a pansé le patient + %1 bekötözte a pácienst + + + %1 used %2 + %1 usó %2 + %1 использовал %2 + %1 użył %2 + %1 utilise %2 + %1 használta a %2-t + + + %1 has given an IV + %1 has puesto una IV + %1 провел переливание + %1 podał IV + %1 a administré une IV + %1 infúziót adott + + + %1 applied a tourniquet + %1 aplicado torniquete + %1 наложил жгут + %1 założył stazę + %1 a appliqué un garrot + %1 felhelyezett egy érszorítót + + + Heavily wounded + Schwer verwundet: + Ciężko ranny + + + Lightly wounded + Leicht verwundet: + Lekko ranny + + + Very lightly wounded + Sehr leicht verwundet: + B. lekko ranny + + + Head + Kopf + Głowa + + + Torso + Torso + Tors + + + Left Arm + Linker Arm + Lewe ramię + + + Right Arm + Rechter Arm + Prawe ramię + + + Left Leg + Linkes Bein + Lewa noga + + + Right Leg + Rechtes Bein + Prawa noga + + + Pain Effect Type + Schmerzeffekt-Typ + Rodzaj efektu bólu + + + Colour Flashing + Farbblinken + Pulsujące kolory + + + Chromatic Aberration + Chromatische Aberration + Aberracja chromatyczna + + diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp index e337aa96d59..4e459c126c1 100644 --- a/addons/microdagr/config.cpp +++ b/addons/microdagr/config.cpp @@ -21,6 +21,6 @@ class ACE_Settings { class GVAR(MapDataAvailable) { value = 2; typeName = "SCALAR"; - isClientSetable = 0; + isClientSettable = 0; }; }; diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index af577049a0e..2a5f34a12c6 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -1,4 +1,4 @@ -/* +/* * Author: PabstMirror * Updates the display (several times a second) called from the pfeh * @@ -53,7 +53,7 @@ case (APP_MODE_INFODISPLAY): { _compassAngleText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (getDir ace_player))), 4, 0] call CBA_fnc_formatNumber; } else { - ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "" //degree symbol is in UTF-8 + ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; (_display displayCtrl IDC_MODEDISPLAY_HEADINGNUM) ctrlSetText _compassAngleText; @@ -92,7 +92,7 @@ case (APP_MODE_INFODISPLAY): { _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; } else { - ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "" //degree symbol is in UTF-8 + ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; _2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; @@ -112,7 +112,7 @@ case (APP_MODE_COMPASS): { _compassAngleText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (getDir ace_player))), 4, 0] call CBA_fnc_formatNumber; } else { - ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "M" //degree symbol is in UTF-8 + ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; (_display displayCtrl IDC_MODECOMPASS_HEADING) ctrlSetText _compassAngleText; @@ -149,7 +149,7 @@ case (APP_MODE_COMPASS): { _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; } else { - ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "M" //degree symbol is in UTF-8 + ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; _2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 2ede1316b49..68b1a0f3779 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -1,168 +1,261 @@  + - - - MicroDAGR GPS - MicroDAGR GPS - GPS MicroDAGR - MicroDAGR GPS - - - MicroDAGR advanced GPS receiver - MicroDAGR - Fortgeschrittener GPS-Empfänger - Receptor avanzado GPS MicroDAGR - Многофункциональный GPS-приёмник. - - - Angular Unit: - Unidad angular: - Угловые единицы: - - - Mils - Mils - Mils - Тысячные - - - Show Waypoints On Map: - Zeige Wegpunkte auf Karte - Mostrar puntos de ruta en el mapa: - Показывать маршрутные точки на карте: - - - Degrees - Grad - Grados - Градусы - - - On - Zapnuto - Oui - Ein - - Wł. - Ativar - Вкл. - Encendido - - - Off - Vypnuto - Non - Aus - No - Wył. - Desativar - Выкл. - Apagado - - - Enter Grid Cords: - Introducir coordenadas de cuadrícula: - Введите координаты: - - - Name of [%1] - Name von [%1] - Nombre de [%1] - Название [%1] - - - MGRS-New - MGRS-NEU - Nuevo-MGRS - MGRS-Новая - - - WGD - WGD - WGD - WGD - - - Range: - Distancia - Reichweite: - Дистанция: - - - Compass Direction - Kompass Richtung - Dirección de la brújula - Азимут - - - Mark - Markiere - Marca - Отметка - - - Waypoints - Puntos de ruta - Wegpunkte - Машрутные точки - - - Connect To - Conectar a - Соединиться с - Verbinde zu - - - Settings - Einstellungen - Configuración - Настройки - - - SetWP - SetzeWP - Establecer PR - Установить МТ - - - Add - Hinzufügen - Añadir - Добавить - - - Delete - Smazat - Supprimer - Löschen - Elimina - Usuń - Excluir - Удалить - Borrar - - - Toggle MicroDAGR Display Mode - Wechsle MircoDAGR Bildschirmmodus - Conmutar modo de pantalla del MicroDAGR - Сменить режим показа MicroDAGR - - - Show MicoDAGR - Zeige MicroDAGR - Mostrar MicroDAGR - Показать MicroDAGR - - - Configure MicroDAGR - Stelle MicroDAGR ein - Configurar MicroDAGR - Настроить MicroDAGR - - - Close MicroDAGR - Schließe MicroDAGR - Cerrar MicroDAGR - Закрыть MicroDAGR - - - + + + MicroDAGR GPS + MicroDAGR GPS + GPS MicroDAGR + MicroDAGR GPS + MicroDAGR GPS + MicroDAGR GPS + MicroDAGR GPS + MicroDAGR GPS + + + MicroDAGR advanced GPS receiver + MicroDAGR - Fortgeschrittener GPS-Empfänger + Receptor avanzado GPS MicroDAGR + Многофункциональный GPS-приёмник. + Zaawansowany odbiornik GPS MicroDAGR + Récepteur GPS MicroDAGR + MicroDAGR pokročílá GPS příjímač + MicroDAGR fejlett GPS vevőegység + + + Angular Unit: + Unidad angular: + Угловые единицы: + Jednostka kątowa: + Unité angulaire + Winkeleinheit: + Úhlová jednotka: + Szögmértékegység: + + + Mils + Mil + Mils + Тысячные + Tysiączne + Mils + Mils + Mil + + + Show Waypoints On Map: + Zeige Wegpunkte auf Karte + Mostrar puntos de ruta en el mapa: + Показывать маршрутные точки на карте: + Pokaż PT na mapie: + Montrer points de passage sur la carte + Ukázat waypointy na mapě: + Útvonalpontok mutatása a térképen: + + + Degrees + Grad + Grados + Градусы + Stopnie + Degrés + Stupně + Fok + + + On + Zapnuto + Allumé + Ein + + Wł. + Ativar + Вкл. + Encendido + Be + + + Off + Vypnuto + Eteint + Aus + No + Wył. + Desativar + Выкл. + Apagado + Ki + + + Enter Grid Cords: + Introducir coordenadas de cuadrícula: + Введите координаты: + Wprowadź współrzędne: + Entrer coordonnées + Koordinaten eingeben: + Napiš souřadnice: + Add meg a rácskoordinátákat: + + + Name of [%1] + Name von [%1] + Nombre de [%1] + Название [%1] + Nazwa [%1] + Nom de %1 + Název [%1] + [%1] neve + + + MGRS-New + UTMREF-NEU + Nuevo-MGRS + MGRS-Новая + MGRS-Nowy + Info-MGRS + MGRS-Nový + MGRS-új + + + WGD + WGD + WGD + WGD + WGD + WGD + WGD + WGD + + + Range: + Distancia: + Reichweite: + Дистанция: + Dystans: + Distance: + Vzdálenost: + Távolság: + + + Compass Direction + Kompass Richtung + Dirección de la brújula + Азимут + Azymut + Azimut + Azimut: + Irányszög + + + Mark + Markieren + Marca + Отметка + Oznacz + Marque + Označit + Jelölés + + + Waypoints + Puntos de ruta + Wegpunkte + Машрутные точки + Waypointy + Punkty trasy + Point de passage + Útvonalpontok + + + Connect To + Conectar a + Соединиться с + Verbinde zu + Připojit k + Podłącz do + Connecter + Csatlakozás + + + Settings + Paramètres + Einstellungen + Configuración + Настройки + Nastavení + Ustawienia + Beállítások + + + SetWP + WP setzen + Establecer PR + Установить МТ + Nastavit WP + UstawPT + Définir point de passage + UP Beállítása + + + Add + Hinzufügen + Añadir + Добавить + Přidat + Dodaj + Ajouter + Hozzáadás + + + Delete + Smazat + Supprimer + Löschen + Elimina + Usuń + Excluir + Удалить + Borrar + + + Toggle MicroDAGR Display Mode + MicoDAGR Anzeigemodus Wechseln + Conmutar modo de pantalla del MicroDAGR + Сменить режим показа MicroDAGR + Przełącz GUI MicroDAGR + Basculer le mode d'affichage MicroDAGR + Přepnout zobrazení MircroDAGRu + MicroDAGR kijelzési mód váltása + + + Show MicoDAGR + Zeige MicroDAGR + Mostrar MicroDAGR + Показать MicroDAGR + Ukázat MicroDAGR GPS + Pokaż<br />MicroDAGR + Afficher MicroDAGR + MicroDAGR mutatása + + + Configure MicroDAGR + MicroDAGR Konfiguriere + Configurar MicroDAGR + Настроить MicroDAGR + Konfigurovat MicroDAGR GPS + Konfiguruj<br />MicroDAGR + Configurer MicroDAGR + MicroDAGR konfigurálása + + + Close MicroDAGR + Schließe MicroDAGR + Cerrar MicroDAGR + Закрыть MicroDAGR + Zavřít MicroDAGR GPS + Zamknij<br />MicroDAGR + Fermer MicroDAGR + MicroDAGR elrejtése + + + \ No newline at end of file diff --git a/addons/missileguidance/ACE_GuidanceConfig.hpp b/addons/missileguidance/ACE_GuidanceConfig.hpp index 4c0122c8e49..f3434fef9be 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/ACE_Settings.hpp b/addons/missileguidance/ACE_Settings.hpp index 060bde199b2..d489ef15f3d 100644 --- a/addons/missileguidance/ACE_Settings.hpp +++ b/addons/missileguidance/ACE_Settings.hpp @@ -1,9 +1,10 @@ class ACE_Settings { class GVAR(enabled) { - value = 1; - typeName = "BOOL"; - isClientSetable = 1; + value = 2; + typeName = "SCALAR"; + isClientSettable = 1; displayName = "$STR_ACE_MissileGuidance"; description = "$STR_ACE_MissileGuidance_Desc"; + values[] = {"Off", "Player Only", "Player and AI"}; }; }; \ No newline at end of file diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index 5aaee5ff2fb..a05ecee9bc8 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/CfgEventhandlers.hpp b/addons/missileguidance/CfgEventhandlers.hpp index 49f067ff466..8afeb9245ec 100644 --- a/addons/missileguidance/CfgEventhandlers.hpp +++ b/addons/missileguidance/CfgEventhandlers.hpp @@ -12,6 +12,12 @@ class Extended_PostInit_EventHandlers { class Extended_FiredBIS_EventHandlers { class All { - ADDON = QUOTE(_this call FUNC(fired)); + ADDON = QUOTE(_this call FUNC(onFired)); + }; +}; + +class Extended_IncomingMissile_EventHandlers { + class All { + ADDON = QUOTE(_this call FUNC(onIncomingMissile)); }; }; \ No newline at end of file diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp index ec07cd96c11..7707717c9e0 100644 --- a/addons/missileguidance/CfgVehicles.hpp +++ b/addons/missileguidance/CfgVehicles.hpp @@ -1,19 +1,29 @@ class CfgVehicles { - class Heli_Attack_01_base_F; - class B_Heli_Attack_01_F : Heli_Attack_01_base_F { + class AllVehicles; + class Air: AllVehicles { + class Turrets; + }; + + class Helicopter: Air { class Turrets { class MainTurret; }; }; + class Helicopter_Base_F: Helicopter {}; + class Heli_Attack_01_base_F: Helicopter_Base_F {}; + class B_Heli_Attack_01_F : Heli_Attack_01_base_F { + class Turrets: Turrets { + class MainTurret; + }; + }; class ACE_Comanche_Test : B_Heli_Attack_01_F { - displayName = "ACE_Comanche_Test"; + displayName = "ACE_Comanche_Test"; author = "ACE Team"; - class Library - { - libTextDesc = "ACE_Comanche_Test"; - }; + class Library { + libTextDesc = "ACE_Comanche_Test"; + }; class Turrets: Turrets { class MainTurret: MainTurret { magazines[] = {"ACE_500Rnd_20mm_shells_Comanche", "24Rnd_ACE_Hellfire_AGM114K"}; @@ -21,4 +31,3 @@ class CfgVehicles { }; }; }; - diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index 873715fef88..d19b8475c9c 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -2,8 +2,13 @@ PREP(rotateVectLineGetMap); PREP(rotateVectLine); +PREP(changeMissileDirection); -PREP(fired); +PREP(checkSeekerAngle); +PREP(checkLos); + +PREP(onFired); +PREP(onIncomingMissile); PREP(guidancePFH); PREP(doAttackProfile); @@ -14,10 +19,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 d416b6a9e20..498b7542873 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 00000000000..822afd7f1b6 --- /dev/null +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -0,0 +1,65 @@ +//#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 * (_distanceShooterToTarget/2000); + + 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 00000000000..dc8b9b8e9dd --- /dev/null +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -0,0 +1,77 @@ +//#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",""); + TRACE_1("", ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) ); + if(_distanceShooterToTarget < 1250 || _distanceToTarget < ( ((ASLToATL _projectilePos) select 2) - (( ASLToATL _seekerTargetPos) select 2) ) * 1.5) 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 90ec75ad7fe..032ae51791d 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 498b7542873..00000000000 --- 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 767f5df3516..00000000000 --- 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 00000000000..fda7ba9d07c --- /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_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf new file mode 100644 index 00000000000..f21a8413678 --- /dev/null +++ b/addons/missileguidance/functions/fnc_checkLos.sqf @@ -0,0 +1,29 @@ +/* + * Author: jaynus + * Returns whether the seeker object can see the target position with lineIntersect + * + * Argument: + * 0: Seeker [Object] + * 1: Target [Object] + * + * Return value: + * Boolean + */ +#include "script_component.hpp" +private["_seeker", "_seekerPos", "_target", "_targetPos", "_return", "_vectorTo", "_searchPos"]; +_seeker = _this select 0; +_target = _this select 1; + +_targetPos = getPosASL _target; +_seekerPos = getPosASL _seeker; +_return = true; + +if(!(terrainIntersectASL [ _seekerPos, _targetPos])) then { + if(lineIntersects [_seekerPos, _targetPos, _seeker, _target]) then { + _return = false; + }; +} else { + _return = false; +}; + +_return; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf new file mode 100644 index 00000000000..e8bc1a16f5e --- /dev/null +++ b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf @@ -0,0 +1,31 @@ +/* + * Author: jaynus + * Returns whether the target position is within the maximum angle FOV of the provided seeker + * objects current direction. + * + * Argument: + * 0: Seeker [Object] + * 1: Target [Position] + * 2: Max Angle [Degrees] + * + * Return value: + * Boolean + */ + +#include "script_component.hpp" +private["_seeker", "_targetPos", "_seekerMaxAngle", "_sensorPos", "_testPointVector", "_testDotProduct"]; + +_seeker = _this select 0; +_targetPos = _this select 1; +_seekerMaxAngle = _this select 2; + +_sensorPos = getPosASL _seeker; + +_testPointVector = vectorNormalized (_targetPos vectorDiff _sensorPos); +_testDotProduct = (vectorNormalized (velocity _seeker)) vectorDotProduct _testPointVector; + +if(_testDotProduct < (cos _seekerMaxAngle)) exitWith { + false +}; + +true \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 7041201ded9..f7fd56c164e 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(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; +}; -if(!alive _projectile || isNull _projectile || isNull _shooter) exitWith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; +_minDeflection = ((_flightParams select 0) - ((_flightParams select 0) * _adjustTime)) max 0; +_maxDeflection = (_flightParams select 1) * _adjustTime; +_incDeflection = _flightParams select 2; + +_projectilePos = getPosASL _projectile; + +// @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); + }; }; -// TODO: placeholder for "last seek target position" -_seekerTargetPos = [ [0,0,0], _args] call FUNC(doSeekerSearch); -if(!isNil "_seekerTargetPos") then { - - _profileAdjustedTargetPos = [_seekerTargetPos,_args] call FUNC(doAttackProfile); - - _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) ) ); - }; +_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((_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) ) ); - }; +}; +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) ) ); }; - -#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 - - 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]; +}; +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 - hintSilent format["d: %1", _distanceToTarget]; +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]]; + +hintSilent format["d: %1", _distanceToTarget]; #endif -}; _stateParams set[0, diag_tickTime]; diff --git a/addons/missileguidance/functions/fnc_fired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf similarity index 71% rename from addons/missileguidance/functions/fnc_fired.sqf rename to addons/missileguidance/functions/fnc_onFired.sqf index bb162e1f09d..186a6224176 100644 --- a/addons/missileguidance/functions/fnc_fired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -2,10 +2,10 @@ #include "script_component.hpp" // Bail if guidance is disabled -if(!GVAR(enabled)) exitWith { false }; - // Bail on locality of the projectile, it should be local to us -if(!local _projectile) exitWith { false }; +if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; + +if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; private["_config", "_enabled", "_target", "_seekerType", "_attackProfile"]; PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); @@ -13,17 +13,20 @@ 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 if(isNil "_enabled" || {_enabled != 1}) exitWith { false }; _target = (vehicle _shooter) getVariable [QGVAR(target), nil]; +_targetPos = (vehicle _shooter) getVariable [QGVAR(targetPosition), nil]; _seekerType = (vehicle _shooter) getVariable [QGVAR(seekerType), nil]; _attackProfile = (vehicle _shooter) getVariable [QGVAR(attackProfile), nil]; _lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil]; +_launchPos = getPosASL (vehicle _shooter); + TRACE_3("Begin guidance", _target, _seekerType, _attackProfile); if ( isNil "_seekerType" || { ! ( _seekerType in (getArray (_config >> "seekerTypes" ) ) ) } ) then { @@ -38,21 +41,28 @@ if ( isNil "_lockMode" || { ! ( _lockMode in (getArray (_config >> "seekerLockMo // If we didn't get a target, try to fall back on tab locking if(isNil "_target") then { - _canUseLock = getNumber (_config >> "canVanillaLock"); - if(_canUseLock > 0) then { - // @TODO: Get vanilla target - _vanillaTarget = cursorTarget; - - TRACE_1("Using Vanilla Locking", _vanillaTarget); - if(!isNil "_vanillaTarget") then { - _target = _vanillaTarget; + + if(!isPlayer _shooter) then { + // This was an AI shot, lets still guide it on the AI target + _target = _shooter getVariable[QGVAR(vanilla_target), nil]; + TRACE_1("Detected AI Shooter!", _target); + } else { + _canUseLock = getNumber (_config >> "canVanillaLock"); + if(_canUseLock > 0) then { + // @TODO: Get vanilla target + _vanillaTarget = cursorTarget; + + TRACE_1("Using Vanilla Locking", _vanillaTarget); + if(!isNil "_vanillaTarget") then { + _target = _vanillaTarget; + }; }; }; }; TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile); [FUNC(guidancePFH), 0, [_this, - [ACE_player, + [_shooter, [_target, _targetPos, _launchPos], _seekerType, _attackProfile, @@ -68,7 +78,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_onIncomingMissile.sqf b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf new file mode 100644 index 00000000000..33ebeb34e2f --- /dev/null +++ b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf @@ -0,0 +1,8 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +PARAMS_3(_target,_ammo,_shooter); + +if(GVAR(enabled) < 1) exitWith {}; // bail if enabled +if !(local (gunner _shooter) || {local _shooter}) exitWith {}; // bail if not shooter + +_shooter setVariable [QGVAR(vanilla_target),_target, false]; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 3ce123d89ce..74d3b0fc713 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -19,14 +19,31 @@ if(!isNil "_target") then { _foundTargetPos = getPosASL _target; }; -TRACE_2("", _target, _foundTargetPos); +// @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); -_projectileSpeed = (vectorMagnitude velocity _projectile); -_distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; - -_eta = _distanceToTarget / _projectileSpeed; +_losOkay = false; +if(_angleOkay) then { + _losOkay = [_projectile, _target] call FUNC(checkSeekerLos); +}; +TRACE_2("", _angleOkay, _losOkay); + +// If we got here, it was an invalid target, just return a spot 5m in front of the missile +if(!_angleOkay || !_losOkay) then { + _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); +} else { + TRACE_2("", _target, _foundTargetPos); + private["_projectileSpeed", "_distanceToTarget", "_eta", "_adjustVelocity"]; + // @TODO: Configurable lead for seekers + _projectileSpeed = (vectorMagnitude velocity _projectile); + _distanceToTarget = (getPosASL _projectile) vectorDistance _foundTargetPos; + + _eta = _distanceToTarget / _projectileSpeed; + + _adjustVelocity = (velocity _target) vectorMultiply _eta; + _foundTargetPos = _foundTargetPos vectorAdd _adjustVelocity; +}; -_adjustVelocity = (velocity _target) vectorMultiply _eta; -_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 f4d36285d89..07f997a041b 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -2,16 +2,29 @@ #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); -private["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"]; - _seekerTargetPos = _this select 0; _launchParams = _this select 1; _seekerParams = _launchParams select 3; +_angleFov = _seekerParams select 0; + +if(!isNil "_target") then { + // Handle AI or moving vanilla lasers + _foundTargetPos = getPosASL _target; +} else { + _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 { + //_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 { + _foundTargetPos = _sensorPos vectorAdd ((velocity _projectile) vectorMultiply 5); + }; -// TODO: this needs to be shootCone/findStrongestRay after testing -_targets = [_projectile, ACE_DEFAULT_LASER_CODE, (_seekerParams select 0)] call ace_laser_fnc_findLaserDesignator; -_foundTargetPos = getPosASL (_targets select 1); +}; -TRACE_1("Seeker return target pos", _foundTargetPos); _foundTargetPos; \ No newline at end of file diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index fc17de4722e..4a640a60f0e 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -1,107 +1,89 @@  - - - - Advanced Missile Guidance - Avanzada Misiles Orientación - Avancée Missile orientation - Asystent Missile - Erweiterte Missile Guidance - Advanced Missile Guidance - Avanzato Missile Guidance - Avançado Missile Guidance - Részletes rakéta irányító - Расширенный ракетой - - - Enables advanced guidance mechanics and selection for different missiles and fire modes. - - - - - - - - - - - - /* Weapons */ - - Hydra-70 DAGR Missile - - - - - - - - - - - - DAGR - - - - - - - - - - - - Hydra-70 DAGR Laser Guided Missile - - - - - - - - - - - - /* Weapons */ - - Hellfire II AGM-114K Missile - - - - - - - - - - - - AGM-114K - - - - - - - - - - - - Hellfire II AGM-114K Laser Guided Missile - - - - - - - - - - - - - \ No newline at end of file + + + Advanced Missile Guidance + Avanzada Misiles Orientación + Avancée Missile orientation + Zaawansowane naprowadzanie rakiet + Erweitertes Raketenlenksystem + Pokročilé řízení střel + Avanzato Missile Guidance + Avançado Missile Guidance + Fejlett rakétairányító + Расширенный ракетой + + + Hydra-70 DAGR Missile + + + Hydra-70 DAGR + Hydra-70 DAGR Rackete + Hydra-70 DAGR + + + Hydra-70 DAGR rakéta + + + + DAGR + + + DAGR + DAGR + DAGR + + + DAGR + + + + Hydra-70 DAGR Laser Guided Missile + + + Laserowo naprowadzana rakieta Hydra-70 DAGR + Hydra-70 DAGR lasergelenkte Rakete + Hydra-70 DAGR laserem naváděná střela + + + Hydra-70 DAGR lézer-irányított rakéta + + + + Hellfire II AGM-114K Missile + + + Hellfire II AGM-114K + Hellfire II AGM-114K + Hellfire II AGM-114K + + + Hellfire II AGM-114K rakéta + + + + AGM-114K + + + AGM-114K + AGM-114K + AGM-114K + + + AGM-114K + + + + Hellfire II AGM-114K Laser Guided Missile + + + Laserowo naprowadzana rakieta Hellfire II AGM-114K + Hellfire II AGM-114K Lasergelenkte Rakete + Hellfire II AGM-114K laserem naváděná střela + + + Hellfire II AGM-114K lézer-irányított rakéta + + + + diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf index 310b689e15d..224cd932734 100644 --- a/addons/movement/XEH_postInit.sqf +++ b/addons/movement/XEH_postInit.sqf @@ -1,6 +1,8 @@ //by commy2 #include "script_component.hpp" +if (!hasInterface) exitWith {}; + ["inventoryDisplayLoaded", { [{ diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 51ab97b80ab..6cf2c9470c5 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -21,7 +21,7 @@ class ACE_Settings { class GVAR(useImperial) { value = 0; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_Movement_UseImperial"; }; }; diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index d31896acaa8..22759373986 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -1,46 +1,49 @@  - - - - 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 lb - 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 - Klettern - Wspinaczka - Trepar - Vylézt - Подняться - - - Can't climb here - Kann hier nicht klettern - Nie możesz wspiąć się tutaj - No se puede trepar aquí - Zde není možné vylézt - Не можете подняться здесь - - - \ No newline at end of file + + + 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 + Подняться + Mászás + + + 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 + Не можете подняться здесь + Itt nem tudsz mászni + + + diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp index e67703e147a..dce054a9ec5 100644 --- a/addons/nametags/config.cpp +++ b/addons/nametags/config.cpp @@ -19,55 +19,55 @@ class ACE_Settings { class GVAR(defaultNametagColor) { value[] = {0.77, 0.51, 0.08, 1}; typeName = "COLOR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_DefaultNametagColor"; }; class GVAR(showPlayerNames) { value = 1; typeName = "SCALAR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_ShowPlayerNames"; values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; }; class GVAR(showPlayerRanks) { value = 1; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_ShowPlayerRanks"; }; class GVAR(showVehicleCrewInfo) { value = 1; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_ShowVehicleCrewInfo"; }; class GVAR(showNamesForAI) { value = 0; typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_ShowNamesForAI"; }; class GVAR(showCursorTagForVehicles) { value = 0; typeName = "BOOL"; - isClientSetable = 0; + isClientSettable = 0; }; class GVAR(showSoundWaves) { value = 1; typeName = "SCALAR"; - isClientSetable = 1; + isClientSettable = 1; displayName = "$STR_ACE_NameTags_ShowSoundWaves"; values[] = {"Disabled", "Use Nametag settings", "Always Show All"}; }; class GVAR(PlayerNamesViewDistance) { value = 5; typeName = "SCALAR"; - isClientSetable = 0; + isClientSettable = 0; }; class GVAR(PlayerNamesMaxAlpha) { value = 0.8; typeName = "SCALAR"; - isClientSetable = 0; + isClientSettable = 0; }; }; diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index b7dc920fa20..56c5cfc2f18 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -42,7 +42,7 @@ _pfEHCode = switch (true) do { case (isClass (configFile >> "cfgPatches" >> "acre_api")): { { _oldSetting = ACE_player getVariable [QGVAR(isSpeaking), false]; - _newSetting = ([ACE_player] call ACRE_api_fnc_isBroadcasting) || {!(isNull findDisplay 55)}; + _newSetting = ([ACE_player] call acre_api_fnc_isSpeaking) || ([ACE_player] call acre_api_fnc_isBroadcasting) || {!(isNull findDisplay 55)}; if (!(_oldSetting isEqualTo _newSetting)) then { ACE_player setVariable [QGVAR(isSpeaking), _newSetting, true]; }; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 67c3b37aa84..32eb35781ba 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,87 +1,101 @@  - - - Show Names - Namen anzeigen - Mostrar nombres - Afficher noms - Zobrazit jména - Pokaż nazwy - Nevek mutatása - Показать имена - - - Show player names - Spielernamen anzeigen - Mostrar nombres de jugadores - Pokaż nazwy graczy - Afficher nom des joueurs - Játékosnevek mutatása - Zobrazit jména hráčů - Mostrar nomes de jogadores - Mostra i nomi dei giocatori - Показать имена игроков - - - Show player name only on cursor (requires player names) - Pokaż nazwę gracza tylko pod kursorem - Mostrar nombres solo en el cursor (requiere Mostrar nombres de jugadores) - Zeige Spielernamen nur an, wenn die Maus auf sie gerrichtet ist (benötigt Spielernamen) - Noms uniquement sous le curseur (si noms affichés) - Zobrazit jméno hráče jenom na kurzor (vyžaduje jména hráčů) - Mostra i nomi solo se puntati (richiede i nomi dei giocatori abilitati) - Mostrar nome de jogador somente no cursor (requer nome de jogadores) - Játékosok nevének mutatása (névcímke szükséges) - Показать имена игроков только под курсором (требует имен игроков) - - - Show player name only on keypress (requires player names) - Spielernamen nur auf Tastendruck anzeigen (benötigt Spielernamen) - Mostrar nombres solo al pulsar (requiere Mostrar nombres de jugadores) - Noms uniquement sur pression de la touche (si noms affichés) - Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů) - Pokaż nazwę gracza tylko po przytrzymaniu klawisza - Játékosnevek mutatása gombnyomásra(névcíme szükséges) - Показать имена игроков только по нажатию клавиши (требует имен игроков) - - - Show player ranks (requires player names) - Spielerränge anzeigen (benötig Spielernamen) - Pokaż rangi graczy (wymaga nazw graczy) - Mostrar rango de los jugadores (requiere Mostrar nombres de jugadores) - Grade des joueurs (si noms affichés) - Zobrazit hodnosti hráčů (vyžaduje jména hráčů) - Mostra i gradi (richiede i nomi dei giocatori abilitati) - Mostrar patente de jogadores (requer nome de jogadores) - Játékosok rendfokozatának mutatása (névcímke szükséges) - Показать звания игроков (требует имен игроков) - - - Show vehicle crew info - Zeige Fahrzeugbesatzung - Mostrar tripulantes - Pokaż informacje o załodze pojazdu - Zobrazit info o posádce vozidla - Показать экипаж - - - Show name tags for AI units - Zeige KI-Namen - Mostrar etiquetas de nombre para unidades IA - Показывать именые метки ИИ - - - Show SoundWaves (requires player names) - Zeigen Schallwellen (benötigt Spielernamen) - Mostrar onda sonora (requiere Mostrar nombres de jugadores) - Показывать звуковые волны (требует имен игроков) - - - Default Nametag Color (Non Group Members) - Voreingestellte Namenfarbe (Spieler außerhalb der Gruppe) - Цвет меток игроков (не членов групп) - Color de etiquetas de nombre por defecto (No miembros de grupo) - - + + + Show Names + Namen anzeigen + Mostrar nombres + Afficher noms + Zobrazit jména + Pokaż imiona + Nevek mutatása + Показать имена + + + Show player names + Spielernamen anzeigen + Mostrar nombres de jugadores + Pokaż imiona graczy + Afficher nom des joueurs + Játékosnevek mutatása + Zobrazit jména hráčů + Mostrar nomes de jogadores + Mostra i nomi dei giocatori + Показать имена игроков + + + Show player name only on cursor (requires player names) + Pokaż imiona graczy tylko pod kursorem (wymagana opcja Pokaż imiona graczy) + Mostrar nombres solo en el cursor (requiere Mostrar nombres de jugadores) + Zeige Spielernamen nur an, wenn die Maus auf sie gerrichtet ist (benötigt Spielernamen) + Noms uniquement sous le curseur (si noms affichés) + Zobrazit jméno hráče jenom na kurzor (vyžaduje jména hráčů) + Mostra i nomi solo se puntati (richiede i nomi dei giocatori abilitati) + Mostrar nome de jogador somente no cursor (requer nome de jogadores) + Játékosok nevének mutatása csak a kurzoron (a nevek mutatása szükséges) + Показать имена игроков только под курсором (требует имен игроков) + + + Show player name only on keypress (requires player names) + Spielernamen nur auf Tastendruck anzeigen (benötigt Spielernamen) + Mostrar nombres solo al pulsar (requiere Mostrar nombres de jugadores) + Noms uniquement sur pression de la touche (si noms affichés) + Zobrazit jména hráčů jen na klávesu (vyžaduje jména hráčů) + Pokaż imiona graczy tylko po przytrzymaniu klawisza (wymagana opcja Pokaż imiona graczy) + Játékosnevek mutatása csak gombnyomásra (a nevek mutatása szükséges) + Показать имена игроков только по нажатию клавиши (требует имен игроков) + + + Show player ranks (requires player names) + Spielerränge anzeigen (benötig Spielernamen) + Pokaż rangi graczy (wymagana opcja Pokaż imiona graczy) + Mostrar rango de los jugadores (requiere Mostrar nombres de jugadores) + Grade des joueurs (si noms affichés) + Zobrazit hodnosti hráčů (vyžaduje jména hráčů) + Mostra i gradi (richiede i nomi dei giocatori abilitati) + Mostrar patente de jogadores (requer nome de jogadores) + Játékosok rendfokozatának mutatása (a nevek mutatása szükséges) + Показать звания игроков (требует имен игроков) + + + Show vehicle crew info + Afficher les informations de l'équipage + Zeige Fahrzeugbesatzung + Mostrar tripulantes + Pokaż załogę pojazdu + Zobrazit info o posádce vozidla + Показать экипаж + Jármű-legénység adatainak mutatása + + + Show name tags for AI units + Zeige Namen für KI Einheiten + Mostrar etiquetas de nombre para unidades IA + Показывать именые метки ИИ + Zobrazit jména AI + Wyświetl imiona jednostek AI + Afficher les noms des IA + Névcímkék mutatása MI-egységeknél + + + Show SoundWaves (requires player names) + Zeigen Schallwellen (benötigt Spielernamen) + Mostrar onda sonora (requiere Mostrar nombres de jugadores) + Показывать звуковые волны (требует имен игроков) + Zobrazit SoundWaves (vyžaduje jména hráčů) + Pokaż fale dźwiękowe (wymagana opcja Pokaż imiona graczy) + Afficher "qui parle" (si noms affichés) + "Hanghullámok" mutatása (a nevek mutatása szükséges) + + + Default Nametag Color (Non Group Members) + Voreingestellte Namenfarbe (Spieler außerhalb der Gruppe) + Цвет меток игроков (не членов групп) + Color de etiquetas de nombre por defecto (No miembros de grupo) + Domyślny kolor imion (członkowie spoza grupy) + Couleur d'affichage par défaut (si dans aucun groupe) + Standardní barva jmenovek (pro nečleny jednotky) + Alap névcímke-szín (csoporton kívüli személyek) + + diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 16ead016da6..20c916104a9 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -1,127 +1,135 @@  - - - - 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 (Široký) - ПНВ (Широкий) - - - Brightness: %1 - Helligkeit: %1 - Brillo: %1 - Czułość: %1 - Zvýšení: %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 - - + + + 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) + Éjjellátó szemüveg (1. Gen.) + + + 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) + Éjjellátó szemüveg (2. Gen.) + + + 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) + Éjjellátó szemüveg (3. Gen.) + + + 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) + Éjjellátó szemüveg (3. Gen., barna) + + + 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) + Éjjellátó szemüveg (3. Gen., zöld) + + + 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) + Éjjellátó szemüveg (3. Gen., fekete) + + + 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) + Éjjellátó szemüveg (4. Gen.) + + + NV Goggles (Wide) + NS-Brille (Weitwinkel) + Sistema de visión nocturna (Panorámicas) + Gogle noktowizyjne (panoramiczne) + Noktovizor (Širokoúhlý) + ПНВ (Широкий) + JVN (Large) + Éjjellátó szemüveg (széles látószögű) + + + 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 + Увеличить яркость ПНВ + Éjjellátó fényerejének 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 + Уменьшить яркость ПНВ + Éjjellátó fényerejének csökkentése + Diminuir Luminosidade do EVN + Riduci la luminosità dell'NVG + + diff --git a/addons/noradio/XEH_post_initClient.sqf b/addons/noradio/XEH_post_initClient.sqf index e192a101f83..4f35a1ced96 100644 --- a/addons/noradio/XEH_post_initClient.sqf +++ b/addons/noradio/XEH_post_initClient.sqf @@ -1,31 +1,29 @@ // by commy2 - #include "script_component.hpp" +/* _setupPlayer = { - if (!isNull ACE_player) then { - [(_this select 1)] call cba_fnc_removePerFrameHandler; + if (!isNull ACE_player) then { + [(_this select 1)] call cba_fnc_removePerFrameHandler; - [ACE_player] call EFUNC(common,muteUnit); - ACE_player setVariable [QGVAR(isMuted), true, true]; - }; + [ACE_player, "isPlayer"] call EFUNC(common,muteUnit); + }; }; [_setupPlayer, 0, []] call CBA_fnc_addPerFrameHandler; +*/ + +if (!hasInterface) exitWith {}; // Mutes/unmutes units when the player changes ["playerChanged", { - EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer); - - // On player change mute the new player - [_newPlayer] call EFUNC(common,muteUnit); - _newPlayer setVariable [QGVAR(isMuted), true, true]; + EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer); - // Unmute the old player - //@todo: sort interaction with medical system - if (!(_oldPlayer getVariable ["ACE_isUnconscious", false]) && {alive _oldPlayer}) then { - [_oldPlayer] call EFUNC(common,unMuteUnit); - }; - _oldPlayer setVariable [QGVAR(isMuted), false, true]; + // On player change mute the new player + [_newPlayer, "isPlayer"] call EFUNC(common,muteUnit); + // Unmute the old player + if (alive _oldPlayer) then { + [_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit); + }; }] call EFUNC(common,addEventhandler); diff --git a/addons/noradio/XEH_post_initServer.sqf b/addons/noradio/XEH_post_initServer.sqf index 90b7473144b..ae2dc16ec19 100644 --- a/addons/noradio/XEH_post_initServer.sqf +++ b/addons/noradio/XEH_post_initServer.sqf @@ -1,10 +1,6 @@ // by commy2 - #include "script_component.hpp" addMissionEventHandler ["HandleDisconnect", { - if !((_this select 0) getVariable ["ACE_isUnconscious", false]) then { //@ToDo: ai waking up will be silent? - _this call EFUNC(common,unMuteUnit); - }; - (_this select 0) setVariable [QGVAR(isMuted), false, true]; + [_this select 0, "isPlayer"] call EFUNC(common,unmuteUnit); }]; diff --git a/addons/optics/CfgRscTitles.hpp b/addons/optics/CfgRscTitles.hpp index 956a2c76c00..068bb0aa202 100644 --- a/addons/optics/CfgRscTitles.hpp +++ b/addons/optics/CfgRscTitles.hpp @@ -70,9 +70,9 @@ class RscInGameUI { colorText[] = {1,1,1,0}; colorBackground[] = {0,0,0,0}; x = safezoneX+0.5*safezoneW-0.5*SIZEX; - y = safezoneY+0.5*safezoneH-0.5*SIZEX*safezoneW/safezoneH; + y = safezoneY+0.5*safezoneH-0.5*SIZEX*safezoneW/safezoneH*(16/9)/(getResolution select 4); w = SIZEX; - h = SIZEX*safezoneW/safezoneH; + h = SIZEX*safezoneW/safezoneH*(16/9)/(getResolution select 4); }; class ReticleNight: ReticleDay { @@ -86,9 +86,9 @@ class RscInGameUI { idc = 1713005; text = ""; x = safezoneX+0.5*safezoneW-0.5*SIZEX; - y = safezoneY+0.5*safezoneH-0.5*SIZEX*safezoneW/safezoneH; + y = safezoneY+0.5*safezoneH-0.5*SIZEX*safezoneW/safezoneH*(16/9)/(getResolution select 4); w = SIZEX; - h = SIZEX*safezoneW/safezoneH; + h = SIZEX*safezoneW/safezoneH*(16/9)/(getResolution select 4); }; class BodyNight: BodyDay { diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp index 29a3ff8c983..7749db0bc41 100644 --- a/addons/optics/CfgWeapons.hpp +++ b/addons/optics/CfgWeapons.hpp @@ -2,6 +2,23 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; + class Default; + + class Binocular: Default { + forceOptics = 0; // Allow using compass with Binocular + opticsZoomMin = 0.056889; // 5.25x power + opticsZoomMax = 0.056889; // 9 px/mil + modelOptics = "\z\ace\addons\optics\models\NWD_M22_5x"; // 7 horizontal field of view + visionMode[] = {"Normal"}; // Can't use nvgs with binoculars any more than you can with scopes + // Fix AI using Binocs on short range - #18737 + // minRange = 300; // 300 = uses Rangefinder often (runs a few meters, stops, uses RF, repeats) + minRange = 500; //500 = seem almost never use it..? + minRangeProbab = 0.001; + midRange = 1000; + midRangeProbab = 0.01; + maxRange = 5000; + maxRangeProbab = 0.01; + }; // zooming reticle scopes class optic_DMS: ItemCore { @@ -198,6 +215,11 @@ class CfgWeapons { }; class ACE_optic_SOS_2D: optic_SOS { + GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa)); + GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa)); + GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa)); + GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa)); + author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_optic_SOS_2D"; displayName = "$STR_ACE_optic_sos"; @@ -215,11 +237,6 @@ class CfgWeapons { }; class ACE_optic_SOS_PIP: ACE_optic_SOS_2D { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa)); - author = "$STR_ACE_Common_ACETeam"; _generalMacro = "ACE_optic_SOS_PIP"; scopeArsenal = 1; diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf index d1b75319284..51da4c8eadc 100644 --- a/addons/optics/functions/fnc_handleFired.sqf +++ b/addons/optics/functions/fnc_handleFired.sqf @@ -52,7 +52,7 @@ _scopeShiftY = _recoilCoef * linearConversion [0, 1, random 1, SCOPE_SHIFT_Y_MIN private ["_sizeX", "_sizeY"]; _sizeX = (0.75+_recoilScope)/(getResolution select 5); -_sizeY = _sizeX*safezoneW/safezoneH; +_sizeY = _sizeX*safezoneW/safezoneH*(16/9)/(getResolution select 4); private "_positionReticle"; _positionReticle = [ @@ -83,7 +83,7 @@ _positionBody = [ // Bring them all back _sizeX = 0.75/(getResolution select 5); -_sizeY = _sizeX*safezoneW/safezoneH; +_sizeY = _sizeX*safezoneW/safezoneH*(16/9)/(getResolution select 4); _positionReticle = [ safezoneX+0.5*safezoneW-0.5*_sizeX, diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf index 10c6eeff40e..30cdb927c78 100644 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ b/addons/optics/functions/fnc_onDrawScope2D.sqf @@ -39,7 +39,7 @@ _nightOpacity = [1,0] select (_dayOpacity == 1); // Apply lighting and make layers visible (_display displayCtrl 1713001) ctrlSetTextColor [1,1,1,1]; -(_display displayCtrl 1713002) ctrlSetTextColor [1,1,1,_nightOpacity]; +(_display displayCtrl 1713002) ctrlSetTextColor [1,1,1,[0,1] select (_dayOpacity < 0.5)]; (_display displayCtrl 1713005) ctrlSetTextColor [1,1,1,_dayOpacity]; (_display displayCtrl 1713006) ctrlSetTextColor [1,1,1,_nightOpacity]; diff --git a/addons/optics/models/NWD_M22_5x.p3d b/addons/optics/models/NWD_M22_5x.p3d new file mode 100644 index 00000000000..b6df76e30bc Binary files /dev/null and b/addons/optics/models/NWD_M22_5x.p3d differ diff --git a/addons/optics/reticles/4x_M22.paa b/addons/optics/reticles/4x_M22.paa new file mode 100644 index 00000000000..c685763a992 Binary files /dev/null and b/addons/optics/reticles/4x_M22.paa differ diff --git a/addons/optics/reticles/M22_font.paa b/addons/optics/reticles/M22_font.paa new file mode 100644 index 00000000000..539907d61fe Binary files /dev/null and b/addons/optics/reticles/M22_font.paa differ diff --git a/addons/optics/reticles/bino_dirt.paa b/addons/optics/reticles/bino_dirt.paa new file mode 100644 index 00000000000..ea08efa3a7c Binary files /dev/null and b/addons/optics/reticles/bino_dirt.paa differ diff --git a/addons/optics/reticles/bino_ring.paa b/addons/optics/reticles/bino_ring.paa new file mode 100644 index 00000000000..53499af7ce2 Binary files /dev/null and b/addons/optics/reticles/bino_ring.paa differ diff --git a/addons/optics/stringtable.xml b/addons/optics/stringtable.xml index 3e518a63d13..28530ecf1e0 100644 --- a/addons/optics/stringtable.xml +++ b/addons/optics/stringtable.xml @@ -1,125 +1,126 @@  - + - - - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - RCO (2D) - - - - RCO (PIP) - RCO (PIP) - RCO (PIP) - RCO (BIB) - RCO (PIP) - RCO (PIP) - RCO (PIP) - RCO (PIP) - RCO (PIP) - - - - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - ARCO (2D) - - - - ARCO (PIP) - ARCO (PIP) - ARCO (PIP) - ARCO (BIB) - ARCO (PIP) - ARCO (PIP) - ARCO (PIP) - ARCO (PIP) - ARCO (PIP) - - - - MRCO (2D) - MRCO (2D) - MRCO (2D) - MRCO (2D) - MRCO (2D) - MRCO (2D) - MRCO (2D) - Прицел MRCO (2D) - MRCO (2D) - - - - MRCO (PIP) - MRCO (PIP) - MRCO (PIP) - MRCO (BIB) - MRCO (PIP) - MRCO (PIP) - MRCO (PIP) - Прицел MRCO (PIP) - MRCO (PIP) - - - - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - MOS (2D) - - - - MOS (PIP) - MOS (PIP) - MOS (PIP) - MOS (BIB) - MOS (PIP) - MOS (PIP) - MOS (PIP) - MOS (PIP) - MOS (PIP) - - - - LRPS (2D) - LRPS (2D) - LRPS (2D) - LRPS (2D) - LRPS (2D) - LRPS (2D) - LRPS (2D) - LRPS (2D) - MPLD (2D) - - - - LRPS (PIP) - LRPS (PIP) - LRPS (PIP) - LRPS (BIB) - LRPS (PIP) - LRPS (PIP) - LRPS (PIP) - LRPS (PIP) - MPLD (PIP) - - - + + + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + RCO (2D) + + + RCO (PIP) + RCO (PIP) + RCO (PIP) + RCO (BIB) + RCO (PIP) + RCO (PIP) + RCO (PIP) + RCO (PIP) + RCO (PIP) + RCO (PIP) + + + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + ARCO (2D) + + + ARCO (PIP) + ARCO (PIP) + ARCO (PIP) + ARCO (BIB) + ARCO (PIP) + ARCO (PIP) + ARCO (PIP) + ARCO (PIP) + ARCO (PIP) + ARCO (PIP) + + + MRCO (2D) + MRCO (2D) + MRCO (2D) + MRCO (2D) + MRCO (2D) + MRCO (2D) + MRCO (2D) + Прицел MRCO (2D) + MRCO (2D) + MRCO (2D) + + + MRCO (PIP) + MRCO (PIP) + MRCO (PIP) + MRCO (BIB) + MRCO (PIP) + MRCO (PIP) + MRCO (PIP) + Прицел MRCO (PIP) + MRCO (PIP) + MRCO (PIP) + + + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + MOS (2D) + + + MOS (PIP) + MOS (PIP) + MOS (PIP) + MOS (BIB) + MOS (PIP) + MOS (PIP) + MOS (PIP) + MOS (PIP) + MOS (PIP) + MOS (PIP) + + + LRPS (2D) + LRPS (2D) + LRPS (2D) + LRPS (2D) + LRPS (2D) + LRPS (2D) + LRPS (2D) + LRPS (2D) + MPLD (2D) + LRPS (2D) + + + LRPS (PIP) + LRPS (PIP) + LRPS (PIP) + LRPS (BIB) + LRPS (PIP) + LRPS (PIP) + LRPS (PIP) + LRPS (PIP) + MPLD (PIP) + LRPS (PIP) + + + \ No newline at end of file diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp index 89d57686030..675e415e47a 100644 --- a/addons/optionsmenu/config.cpp +++ b/addons/optionsmenu/config.cpp @@ -1,23 +1,23 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {"ACE_moduleAllowConfigExport"}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Glowbal", "PabstMirror"}; - authorUrl = "http://github.com/Glowbal"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {"ACE_moduleAllowConfigExport"}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Glowbal", "PabstMirror"}; + authorUrl = "http://github.com/Glowbal"; + VERSION_CONFIG; + }; }; class CfgAddons { - class PreloadAddons { - class ADDON { - list[] = {QUOTE(ADDON)}; + class PreloadAddons { + class ADDON { + list[] = {QUOTE(ADDON)}; + }; }; - }; }; diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index d6a831c2aa1..c4cbae9916b 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -96,11 +96,14 @@ class RscDisplayInterruptEditor3D: RscStandardDisplay { }; }; class RscDisplayMain: RscStandardDisplay { + //Hide the button if there is no world (-world=empty) + //Seems odd to use onMouseMoving, but I don't want to overload onLoad + onMouseMoving = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');"; class controls { class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase { action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};"; y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY"; + idc = 80085; }; }; }; - diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 3e311b92ae4..c4ac2b1593d 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,143 +1,202 @@  - - - ACE Options - ACE Optionen - Opciones ACE - Opcje ACE - ACE Nastavení - ACE Options - ACE Настройки - Opções do ACE - ACE Opciók - Opzioni ACE - - - Fix Animation - Behebe Animation - Arreglar animación - Фикс анимации - - - Reset All - Alles Zurücksetzen - Reiniciar todo - Полный сброс - - - Colors - Farben - Colores - Цвета - - - Options - Optionen - Opciones - Opcje - Nastavení - Options - Настройки - Opções - Opciók - Opzioni - - - Values - Valores - Значения - - - Yes - Ja - Si - Tak - Ano - Oui - Да - Igen - Sim - Si - - - No - Nein - No - Nie - Ne - Non - Нет - Nem - Não - No - - - Setting: - Nastavení: - Einstellung: - Установки: - Ajuste: - - - Export - Exportieren - Exportar - Экспорт - - - Open Export Menu - Öffne Exportmenü - Abrir menu d'exportación - Открыть меню экспорта - - - String input. - String input. - Introducir frase - Строчный ввод. - - - Array. Seperate elements by using ,. - Array. Teile unterschiedliche Elemente mit ,. - Matriz. Separa elementos usando ,. - Массив. Разделяйте элемены, используя запятую. - - - Number - Nummer - Numero - Число - - - Uknown input type - Unbekannter Eingabetyp - Tipo de entrada desconocida - Неизвестный тип ввода - - - Save input - Speichere Eingabe - Guardar entrada - Сохранить ввод - - - Include Client Settings - Beinhalte Client-Einstellungen - Incluir configuración de cliente - Включить настройки клиента - - - Exclude Client Settings - Schließe Client-Einstellungen aus - Excluir configuración de cliente - Исключить настройки клиента - - - Settings exported to clipboard - Einstellungen in die Zwischenablage exportiert - Configuración exportada al portapapeles - Настройки экспортированы в буфер обмена - - + + + ACE Options + ACE Optionen + Opciones ACE + Ustawienia ACE + ACE Nastavení + Options ACE + ACE Настройки + Opções do ACE + ACE Beállítások + Opzioni ACE + + + Fix Animation + Behebe Animation + Arreglar animación + Фикс анимации + Opravit animace + Napraw animację + Corriger animation + Animációk kijavítása + + + Reset All + Alles Zurücksetzen + Reiniciar todo + Полный сброс + Vyresetovat vše + Resetuj wszystko + Défaut + Minden visszaállítása + + + Colors + Couleurs + Farben + Colores + Цвета + Barvy + Kolory + Színek + + + Options + Optionen + Opciones + Opcje + Nastavení + Options + Настройки + Opções + Beállítások + Opzioni + + + Values + Valores + Значения + Hodnoty + Wartości + Valeurs + Werte + Értékek + + + Yes + Ja + Si + Tak + Ano + Oui + Да + Igen + Sim + Si + + + No + Nein + No + Nie + Ne + Non + Нет + Nem + Não + No + + + Setting: + Nastavení: + Einstellung: + Установки: + Ajuste: + Ustawienie: + Paramètres + Opció: + + + Export + Exportieren + Exportar + Экспорт + Exportovat + Eksport + Exporter + Exportálás + + + Open Export Menu + Öffne Exportmenü + Abrir menu d'exportación + Открыть меню экспорта + Otevřít exportovací menu + Otwórz menu eksportowania + Ouvrir le menu d'exportation + Exportálási menü megnyitása + + + String input. + String input. + Introducir frase + Строчный ввод. + Wpisywanie tekstu. + Entrée + String bevitel. + + + Array. Seperate elements by using ,. + Array. Teile unterschiedliche Elemente mit ,. + Matriz. Separa elementos usando ,. + Массив. Разделяйте элемены, используя запятую. + Tablica. Oddziel elementy używając ,. + Tableau. Séparation par ,. + Tabulka. Odděl elementy použitím ,. + Array. Válasszad el az elemeket vesszővel. + + + Number + Nummer + Numero + Число + Číslo + Cyfra + Nombre + Szám + + + Uknown input type + Unbekannter Eingabetyp + Tipo de entrada desconocida + Неизвестный тип ввода + Neznámý vstup + Nieznany rodzaj danych + Type d'entrée inconnue + Ismeretlen beviteli típus + + + Save input + Speichere Eingabe + Guardar entrada + Сохранить ввод + Uložit vstup + Zapisz dane + Sauvegarder + Bevitel elmentése + + + Include Client Settings + Beinhalte Client-Einstellungen + Incluir configuración de cliente + Включить настройки клиента + Zahrnout nastavení klienta + Zawrzyj ustawienia klienta + Inclure paramètres client + Kliens-beállítások melléklése + + + Exclude Client Settings + Schließe Client-Einstellungen aus + Excluir configuración de cliente + Исключить настройки клиента + Nezahrnout nastavení klienta + Wyklucz ustawienia klienta + Exclure paramètres client + Kliens-beállítások elhagyása + + + Settings exported to clipboard + Einstellungen in die Zwischenablage exportiert + Configuración exportada al portapapeles + Настройки экспортированы в буфер обмена + Nastevení exportována do schránky + Ustawienia wyeksportowano do schowka + Paramètres exportés dans le presse papier + Beállítások exportálva a vágólapba + + diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index fff251f096d..12ec43024fc 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/config.cpp b/addons/overheating/config.cpp index 3ccc8ee603d..bd6cdbbdd39 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -23,7 +23,7 @@ class CfgPatches { class ACE_Settings { class GVAR(DisplayTextOnJam) { typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; value = 1; displayName = "$STR_ACE_overheating_SettingDisplayTextName"; description = "$STR_ACE_overheating_SettingDisplayTextDesc"; diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index d1f7a737d97..2468265f8f2 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 aab3ebac6d6..3aaeebdb006 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,153 +1,165 @@  - - - Display text on jam - Zeige Text bei Ladehemmung - Mostrar texto al encasquillar - Показывать текст, когда клинит оружие - - - Display a notification whenever your weapon gets jammed - Zeige einen Hinweis wenn die Waffe eine Ladehemmung hat - Mostrar notificación cada vez que el arma se encasquille - Демонстровать уведомление, каждый раз, когда клинит Ваше оружие. - - - Spare barrel - Ersatzlauf - Cañón de repuesto - Zapasowa lufa - Náhradní hlaveň - Deuxième canon - Запасной ствол - Tartalék cső - Cano Reserva - Canna di ricambio - - - Use to swap barrel. - Benutzen, um Lauf zu wechseln. - Permite intercambiar el cañón - Umożliwia wymianę lufy - Používané k výměně hlavně - Utilisé pour changer de canon. - Используется для смены ствола. - Cső kicseréléséhez. - Use para trocar o cano/estriamento. - Usata per cambiare la canna. - - - Weapon jammed! - Ladehemmung! - Arma encasquillada! - Broń się zacięła! - Zbraň se zasekla! - Arme enrayée - Оружие заклинило! - Elakadt a fegyver! - Arma travada! - Arma inceppata! - - - Clear jam - Ladehemmung beheben - Desencasquillar el arma - Usuń zacięcie - Uvolnit zbraň - Désenrayer l'arme - Исправить клин оружия. - Hárítsd el az akadályt! - Destravar arma - Ripulisci l'arma - - - Jam cleared - Ladehemmung behoben - Arma desencasquillada - Zacięcie usunięte - Zbraň uvolněna - Arme désenrayée - Оружие исправлено - Akadály elhárítva! - Arma destravada - Arma pronta al fuoco - - - Swap barrel - Lauf wechseln - Cambiar el cañón - Wymień lufę - Vyměnit hlaveň - Changer de canon - Сменить ствол - Cserélj csövet! - Substituir cano - Sostiuisci la canna - - - Swapping barrel... - Lauf wird gewechselt... - Cambiando el cañón... - Wymienianie lufy... - Vyměňuji hlaveň ... - Changement du canon... - Смена ствола... - Cső cserélése... - Substituindo cano... - Sto sostituendo la canna ... - - - Swapped barrel - Lauf gewechselt - Cañón cambiado - Lufa wymieniona - Hlaveň vyměněna - Canon changé - Ствол сменен - Cső kicserélve! - Cano substituído - Canna sostituita - - - Check weapons temperature - Temperatur der Waffe prüfen - Verificar temperatura del arma - Sprawdź temperaturę broni - Vérifier la température de l'arme - Hőmérséklet ellenőrzése - Zjistit teplotu zbraně - Conferir temperatura da arma - Controlla la temperatura della canna - Проверить температуру оружия - - - Check weapon<br/>temperature - Verificar temperatura<br/>del arma - - - Checking temperature ... - Prüfe Temperatur ... - Verificando temperatura ... - Sprawdzanie temperatury ... - Vérification de la température ... - Hőmérséklet ellenőrzése... - Zjišťuju teplotu ... - Conferindo temperatura ... - Sto controllando la temperatura ... - Проверка температуры ... - - - Temperature - Temperatur - Temperatura - Temperatura - Température - Hőmérséklet - Teplota - Temperatura - Temperatura - Температура - - + + + Display text on jam + Zeige Text bei Ladehemmung + Mostrar texto al encasquillar + Показывать текст, когда клинит оружие + Zobrazit upozornění při zaseknutí + Wyświetl tekst przy zacięciu broni + Affiche texte si enrayé + Szöveges értesítés kijelzése a fegyver elakadásakor + + + Display a notification whenever your weapon gets jammed + 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 + Affiche une notification lors d'un enrayement + Egy szöveges értesítés jelenik meg, amikor a fegyver megakad + + + Spare barrel + Ersatzlauf + Cañón de repuesto + Zapasowa lufa + Náhradní hlaveň + Deuxième canon + Запасной ствол + Tartalék cső + Cano Reserva + Canna di ricambio + + + Use to swap barrel. + Benutzen, um Lauf zu wechseln. + Permite intercambiar el cañón + Umożliwia wymianę lufy + Používané k výměně hlavně + Utilisé pour changer de canon. + Используется для смены ствола. + Használd a cső kicseréléséhez. + Use para trocar o cano/estriamento. + Usata per cambiare la canna. + + + Weapon jammed! + Ladehemmung! + Arma encasquillada! + Zacięcie! + Zbraň se zasekla! + Arme enrayée + Оружие заклинило! + Megakadt a fegyver! + Arma travada! + Arma inceppata! + + + Clear jam + Ladehemmung beheben + Desencasquillar el arma + Usuń zacięcie + Uvolnit zbraň + Désenrayer l'arme + Исправить клин оружия. + Akadás elhárítása + Destravar arma + Ripulisci l'arma + + + Jam cleared + Ladehemmung behoben + Arma desencasquillada + Zacięcie usunięte + Zbraň uvolněna + Arme désenrayée + Оружие исправлено + Akadás elhárítva + Arma destravada + Arma pronta al fuoco + + + Swap barrel + Lauf wechseln + Cambiar el cañón + Wymień lufę + Vyměnit hlaveň + Changer de canon + Сменить ствол + Cső cserélése + Substituir cano + Sostiuisci la canna + + + Swapping barrel... + Lauf wird gewechselt... + Cambiando el cañón... + Wymienianie lufy... + Vyměňuji hlaveň ... + Changement du canon... + Смена ствола... + Cső kicserélése folyamatban... + Substituindo cano... + Sto sostituendo la canna ... + + + Swapped barrel + Lauf gewechselt + Cañón cambiado + Lufa wymieniona + Hlaveň vyměněna + Canon changé + Ствол сменен + Cső kicserélve + Cano substituído + Canna sostituita + + + Check weapons temperature + Temperatur der Waffe prüfen + Verificar temperatura del arma + Sprawdź temperaturę broni + Vérifier la température de l'arme + Fegyver hőmérsékletének ellenőrzése + Zjistit teplotu zbraně + Conferir temperatura da arma + Controlla la temperatura della canna + Проверить температуру оружия + + + Check weapon temperature + Verificar temperatura del arma + Sprawdź temperaturę broni + Zkontrolovat teplotu zbraně + Vérifier la température + Fegyverhő ellenőrzése + + + Checking temperature ... + Prüfe Temperatur ... + Verificando temperatura ... + Sprawdzanie temperatury ... + Vérification de la température ... + Hőmérséklet ellenőrzése ... + Zjišťuju teplotu ... + Conferindo temperatura ... + Sto controllando la temperatura ... + Проверка температуры ... + + + Temperature + Temperatur + Temperatura + Temperatura + Température + Hőmérséklet + Teplota + Temperatura + Temperatura + Температура + + diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index f97b389eebd..52ccaefe772 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -1,46 +1,46 @@  - + - - - Altimeter - Altimètre - Höhenmesser - Výškoměr - Wysokościomierz - Altímetro - Magasságmérő - Высотомер - - - Altimeter Watch - Montre altimètre - Höhenmesser - Hodinky s výškoměrem - Zegarek z wysokościomierzem - Reloj altímetro - Magasságmérő - Часы с высотомером - - - Used to show height, descent rate and the time. - Affiche la hauteur, le taux de descente et l'heure. - Zeigt Höhe, Fallgeschwindigkeit und Uhrzeit. - Používané k zjištění výšky, rychlosti sestupu a času. - Używany przez spadochroniarzy, pokazuje wysokość, prędkość opadania oraz czas. - Utilizado para mostrar altura, tasa de descenso y hora. - Mutatja a magasságot, zuhanás sebességét és az időt. - Используется для определения высоты, скорости снижения и времени. - - - Non-Steerable Parachute - Ungelenkter Fallschirm - Paracaídas no dirigible - Parachute non manœuvrable - Niesterowalny spadochron - Neříditelný padák - Irányithatatlan ejtőernyő - Неуправляемый парашют - - + + + Altimeter + Altimètre + Höhenmesser + Výškoměr + Wysokościomierz + Altímetro + Magasságmérő + Высотомер + + + Altimeter Watch + Montre altimètre + Höhenmesser + Hodinky s výškoměrem + Zegarek z wysokościomierzem + Reloj altímetro + Magasságmérős karóra + Часы с высотомером + + + Used to show height, descent rate and the time. + Affiche la hauteur, le taux de descente et l'heure. + Zeigt Höhe, Fallgeschwindigkeit und Uhrzeit. + Používané k zjištění výšky, rychlosti sestupu a času. + Używany przez spadochroniarzy, pokazuje wysokość, prędkość opadania oraz czas. + Utilizado para mostrar altura, tasa de descenso y hora. + Mutatja a magasságot, a zuhanási sebességet, és az időt. + Используется для определения высоты, скорости снижения и времени. + + + Non-Steerable Parachute + Ungelenkter Fallschirm + Paracaídas no dirigible + Parachute non manœuvrable + Niesterowalny spadochron + Neříditelný padák + Irányíthatatlan ejtőernyő + Неуправляемый парашют + + \ No newline at end of file diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 28133d66445..a39736c9028 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1,5 +1,4 @@  - @@ -31,7 +30,7 @@ XM312 (Hoch) XM312 (Alto) XM312 (Haut) - XM312 (Vysoký) + XM312 (vysoká montáž) XM312 (Wysoki) XM312 (Высокий) XM312 (Alta) @@ -67,7 +66,7 @@ XM307 (Hoch) XM307 (Alto) XM307 (Haut) - XM307 (Vysoký) + XM307 (vysoká montáž) XM307 (Wysoki) XM307 (Высокий) XM307 (Alta) @@ -76,26 +75,26 @@ 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) Wyrzutnia Mini-Spike (AT) Mini-Spike Пусковое устройство (ПТРК) Lança-mísseis Mini-Spike (AC) - Mini-Spike rakétarendszer (páncéltörő) + Mini-Spike rakétarendszer (Tankelhárító) Lanciatore Mini-Spike (AC) 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) Wyrzutnia Mini-Spike (AA) Mini-Spike Пусковое устройство (ВВ) Lança-mísseis Mini-Spike (AA) - Mini-Spike rakétarendszer (légvédelmi) + Mini-Spike rakétarendszer (Repülő-elhárító) Lanciatore Mini-Spike (AA) @@ -117,6 +116,8 @@ YABHON-R3 (CAS) YABHON-R3 (CAS) YABHON-R3 (штурмовик) + YABHON-R3 (CAS) + YABHON-R3 (Légitámogató) M-ATV @@ -139,7 +140,7 @@ M-ATV (HMG) M-ATV (Пулемет) M-ATV (HMG) - M-ATV (HMG) + M-ATV (nehézgéppuska) M-ATV (HMG) @@ -151,7 +152,7 @@ M-ATV (GMG) M-ATV (Гранатомет) M-ATV (GMG) - M-ATV (GMG) + M-ATV (gránátgéppuska) M-ATV (GMG) @@ -295,7 +296,7 @@ HEMTT Conteneur HEMTT Контейнер HEMTT Contêiner - HEMTT Konténer + HEMTT (konténer) HEMTT portacontainer @@ -367,7 +368,7 @@ Fennek (HMG) Феннек (Пулемет) Fennek (HMG) - Fennek (HMG) + Fennek (nehézgéppuska) Fennek (HMG) @@ -379,7 +380,7 @@ Fennek (GMG) Феннек (Гранатомет) Fennek (GMG) - Fennek (GMG) + Fennek (gránátgéppuska) Fennek (GMG) @@ -511,7 +512,7 @@ Punisher (HMG) Kаратель (Пулемет) Punisher (HMG) - Punisher (HMG) + Punisher (nehézgéppuska) Punisher (HMG) @@ -523,7 +524,7 @@ Punisher (GMG) Kаратель (Гранатомет) Punisher (GMG) - Punisher (GMG) + Punisher (gránátgéppuska) Punisher (GMG) @@ -535,7 +536,7 @@ T100 Black Eagle T100 Черный Орел T100 Black Eagle - T100 Black Eagle + T100 Fekete Sas T100 Black Eagle @@ -591,7 +592,7 @@ Typhoon Transport Typhoon de transporte Typhoon Transportowy - Typhoon Valník + Typhoon valník Typhoon Transport Тайфун Транспортный Typhoon Transporte @@ -603,7 +604,7 @@ Typhoon Transport (bedeckt) Typhoon de transporte (cubierto) Typhoon Transportowy (przykryty) - Typhoon Valník (krytý) + Typhoon valník (krytý) Typhoon Transport (bâché) Тайфун Транспортный (kрытый) Typhoon Transporte (coberto) @@ -615,11 +616,11 @@ Typhoon Gerät Typhoon de dispositivo Typhoon Urządzenie - Typhoon Zařízení + Typhoon zařízení Typhoon Dispositif Тайфун Устройство Typhoon Dispositivo - Typhoon (szerkezet) + Typhoon (eszköz) Typhoon per dispositivo @@ -627,7 +628,7 @@ Typhoon Munition Typhoon de munición Typhoon Amunicyjny - Typhoon Muniční + Typhoon muniční Typhoon Munitions Тайфун Боеприпасы Typhoon Munições @@ -639,7 +640,7 @@ Typhoon Treibstoff Typhoon de combustible Typhoon Cysterna - Typhoon Cisterna + Typhoon cisterna Typhoon Citerne Тайфун Заправщик Typhoon Combustível @@ -651,7 +652,7 @@ Typhoon Instandsetzung Typhoon de reparación Typhoon Naprawczy - Typhoon Opravárenský + Typhoon opravárenský Typhoon Réparation Тайфун Ремонтный Typhoon Reparador @@ -663,7 +664,7 @@ Typhoon Sanitäter Typhoon médico Typhoon Medyczny - Typhoon Zdravotnický + Typhoon zdravotnický Typhoon Sanitaire Тайфун Медицинский Typhoon Médico @@ -724,7 +725,9 @@ CH-47I Chinnok (Desarmado) CH-47I Chinook (nieuzbrojony) CH-47I Chinook (невооруженный) - CH-47I Chinook (Neozbrojený) + CH-47I Chinook (neozbrojený) + CH-47I Chinook (Neozbrojený) + CH-47I Chinook (fegyvertelen) A-10D Thunderbolt II @@ -783,7 +786,7 @@ L-159 ALCA (CAS) L-159 Альбатрос (CAS) L-159 ALCA (CAS) - L-159 ALCA (CAS) + L-159 ALCA (Légitámogató) L-159 ALCA (CAS) @@ -795,7 +798,7 @@ L-159 ALCA (AA) L-159 Альбатрос (AA) L-159 ALCA (ВВ) - L-159 ALCA (AA) + L-159 ALCA (Repülő-elhárító) L-159 ALCA (AA) @@ -863,7 +866,7 @@ M18A1 Claymore M18A1 Claymore Mina kierunkowa M18A1 Claymore - M18A1 Mina Claymore + Mina Claymore M18A1 M18A1 Claymore Mine antipersonnel à effet dirigé M18A1 Клеймор M18A1 Claymore @@ -875,7 +878,7 @@ M183 Geballte Sprengladung Conjunto de carga de demolición M183 Ładunek burzący M183 - M183 Demoliční nálož + Demoliční nálož M183 M183 Charge de Démolition M183 Комплектный подрывной заряд M183 Sacola de Demolição @@ -887,11 +890,11 @@ M112 Sprengladung Bloque de demolición M112 Ładunek burzący M112 - M112 Výbušná nálož + Výbušná nálož M112 Pétard M112 M112 подрывной заряд M112 Carga de Demolição - M112 romboló töltet + M112 romboló tömb M112 Demolition Block @@ -899,7 +902,7 @@ M67 Splittergranate Granada de fragmentación M67 Granat obronny M67 - M67 Granát + Granát M67 M67 Grenade à fragmentation M67 ручная осколочная граната M67 Granada de fragmentação @@ -911,7 +914,7 @@ M83 Rauchgranate (Weiss) Granada de humo M83 (Blanco) Granat dymny M83 (Biały) - M83 Kouřový Granát (Bílý) + M83 Kouřový Granát (bílý) M83 Grenade fumigène (Blanche) M83 дымовая граната (Белый) M83 Granada de fumaça (Branca) @@ -923,7 +926,7 @@ M18 Rauchgranate (Blau) Granada de humo M18 (Azul) Granat dymny M18 (Niebieski) - M18 Kouřový Granát (Modrý) + M18 Kouřový Granát (modrý) M18 Grenade fumigène (Bleue) M18 дымовая граната (Синий) M18 Granada de fumaça (Azul) @@ -935,7 +938,7 @@ M18 Rauchgranate (Grün) Granada de humo M18 (Verde) Granat dymny M18 (Zielony) - M18 Kouřový Granát (Zelený) + M18 Kouřový Granát (zelený) M18 Grenade fumigène (Verte) M18 дымовая граната (Зелёный) M18 Granada de fumaça (Verde) @@ -947,7 +950,7 @@ M18 Rauchgranate (Orange) Granada de humo M18 (Naranja) Granat dymny M18 (Pomarańczowy) - M18 Kouřový Granát (Oranžový) + M18 Kouřový Granát (oranžový) M18 Grenade fumigène (Orange) M18 дымовая граната (Оранжевый) M18 Granada de fumaça (Laranja) @@ -959,7 +962,7 @@ M18 Rauchgranate (Violett) Granada de humo M18 (Púrpura) Granat dymny M18 (Fioletowy) - M18 Kouřový Granát (Fialový) + M18 Kouřový Granát (fialový) M18 Grenade fumigène (Pourpre) M18 дымовая граната (Пурпурный) M18 Granada de fumaça (Roxa) @@ -971,7 +974,7 @@ M18 Rauchgranate (Rot) Granada de humo M18 (Rojo) Granat dymny M18 (Czerwony) - M18 Kouřový Granát (Červený) + M18 Kouřový Granát (červený) M18 Grenade fumigène (Rouge) M18 дымовая граната (Красный) M18 Granada de fumaça (Vermelha) @@ -983,7 +986,7 @@ M18 Rauchgranate (Gelb) Granada de humo M18 (Amarillo) Granat dymny M18 (Żółty) - M18 Kouřový Granát (Žlutý) + M18 Kouřový Granát (žlutý) M18 Grenade fumigène (Jaune) M183 дымовая граната (Жёлтые) M18 Granada de fumaça (Amarela) @@ -995,7 +998,7 @@ M15 Panzerabwehrmine Mina antitanque M15 Mina przeciwpancerna M15 - M15 Protitanková Mina + Protitanková mina M15 M15 Mine antichar M15 противотанковая мина M15 Mina anticarro @@ -1007,7 +1010,7 @@ VS-50 Antipersonenmine Mina antipersona VS-50 Mina przeciwpiechotna VS-50 - VS-50 Protipěchotní Mina + Protipěchotní mina VS-50 VS-50 Mine antipersonnel à pression VS-50 Противопехотная мина VS-50 Mina antipessoal @@ -1019,7 +1022,7 @@ M26 Antipersonensprungmine Mina antipersona M26 Mina przeciwpiechotna M26 - M26 Šrapnelová Mina + Šrapnelová mina M26 M26 Mine antipersonnel bondissante M26 Противопехотная мина M26 Mina saltadora antipessoal @@ -1031,7 +1034,7 @@ PMR-3 Antipersonenstolperdrahtmine Mina antipersona de alambre PMR-3 Mina przeciwpiechotna PMR-3 - PMR-3 Nástražná Mina + Nástražná mina PMR-3 PMR-3 Mine antipersonnel à traction PMR-3 Противопехотная мина PMR-3 Mina antipessoal (armadilha) @@ -1041,334 +1044,566 @@ P99 P99 + P99 + P99 + P99 + P99 P99 MP-443 Grach MP-443 Grach + 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 + ACP-C2 ACP-C2 FNX-45 Tactical FNX-45 Tactical + 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 + Chiappa Rhino 6DS Chiappa Rhino 60DS Taurus Judge Taurus Judge + Taurus Judge + Taurus Judge + Taurus Judge + Taurus Judge Taurus Judge NLAW NLAW + NLAW + NLAW + NLAW + NLAW NLAW RPG-32 RPG-32 + 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 (Repülő-elhárító) Mini-Spike (AA) Mini-Spike (AT) - Mini-Spike (AT) + Mini-Spike (PALR) + Mini-Spike (PT) + Mini-Spike (AA) + Mini-Spike (AT) + Mini-Spike (Tankelhárító) Mini-Spike (AT) MX MX + MX + MX + MX + MX MX MX (Black) - MX (Black) + MX (Schwarz) + MX (Czarny) + MX (černý) + MX ( Noir) + MX (Fekete) MX (Negro) MXC MXC + MXC + MXC + MXC + MXC MXC MXC (Black) - MXC (Black) + MXC (Schwarz) + MXC (Czarny) + MXC (černý) + MXC (Noir) + MXC (Fekete) MXC (Negro) MX 3GL MX 3GL + 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 3GL (Fekete) MX 3GL (Negro) MX LSW MX LSW + 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) + MX LSW (Fekete) MX LSW (Negro) MXM MXM + MXM + MXM + MXM + MXM MXM MXM (Black) - MXM (Black) + MXM (Schwarz) + MXM (Czarny) + MXM (černý) + MXM (Noir) + MXM (Fekete) MXM (Negro) KT2002 Katiba KT2002 Katiba + KT2002 Katiba + KT2002 Katiba + KT2002 Katiba + KT2002 Katiba KT2002 Katiba KT2002C Katiba KT2002C 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 + KT2002 Katiba KGL KT2002 Katiba KGL F2000 (Camo) - F2000 (Camo) + F2000 (Tarnmuster) + F2000 (kamuflaż) + F2000 (kamufláž + F2000 (Camo) + F2000 (Terepmintás) F2000 (Camuflaje) F2000 F2000 + 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 (Terepmintás) F2000 Tactical (Camuflaje) F2000 Tactical F2000 Tactical + 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 (Terepmintás) F2000 EGLM (Camuflaje) F2000 EGLM F2000 EGLM + F2000 EGLM + F2000 EGLM + F2000 EGLM + F2000 EGLM F2000 EGLM TAR-21 TAR-21 + TAR-21 + TAR-21 + TAR-21 + TAR-21 TAR-21 CTAR-21 CTAR-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 + TAR-21 EGLM TAR-21 EGLM Vector SMG Vector SMG + 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 + Scorpion Evo 3 A1 Scorpion Evo 3 A1 CPW CPW + CPW + CPW + CPW + CPW CPW RFB SDAR RFB SDAR + 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 + Stoner 99 Könnyűgéppuska Stoner 99 LMG Negev NG7 Negev NG7 + 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 + Mk14 Mod 1 EBR Mk14 Mod 1 EBR GM6 Lynx GM6 Lynx + GM6 Lynx + GM6 Lynx + GM6 Lynx + GM6 Gepárd GM6 Lynx GM6 Lynx (Camo) - GM6 Lynx (Camo) + GM6 Lynx (Tarnmuster) + GM6 Lynx (kamuflaż) + GM6 Lynx (kamufláž) + GM6 Lynx (Camo) + GM6 Gepárd (Terepmintás) GM6 Lynx (Camuflaje) M200 Intervention M200 Intervention + 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) + M200 Intervention (Terepmintás) M200 Intervention (Camuflaje) VS-121 VS-121 + 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 TODO: MAR-10 .338 (Black) + TODO: MAR-10 .338 (Black) + MAR-10 .338 (Noir) TODO: MAR-10 .338 (Negro) TODO: MAR-10 .338 (Camo) + TODO: MAR-10 .338 (Camo) + MAR-10 .338 (Camo) TODO: MAR-10 .338 (Camuflaje) TODO: MAR-10 .338 (Sand) + TODO: MAR-10 .338 (Sand) + MAR-10 .338 (Beige) TODO: MAR-10 .338 (Arena) 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 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 (Negro) 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 (Caqui) 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 (Arena) 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 (Camuflaje) TODO: Mk-I EMR 7.62 mm (Woodland) + TODO: Mk-I EMR 7.62 mm (Woodland) + Mk-l EMR 7.62 mm (Woodland) TODO: Mk-I EMR 7.62 mm (Bosque) TODO: NATO DMR (provisional) spotter + TODO: NATO DMR (provisional) spotter + NATO DMR (provisoire) Observateur TODO: NATO DMR (provisional) observador 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 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 (Negro) TODO: ASP-1 Kir 12.7 mm (Tan) + TODO: ASP-1 Kir 12.7 mm (Tan) + ASP-1 Kir 12.7 mm (Tan) TODO: 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 TODO: Cyrus 9.3 mm (Black) + TODO: Cyrus 9.3 mm (Black) + Cyrus 9.3 mm (Noir) TODO: Cyrus 9.3 mm (Negro) TODO: Cyrus 9.3 mm (Hex) + TODO: Cyrus 9.3 mm (Hex) + Cyrus 9.3 mm (Hex) TODO: Cyrus 9.3 mm (Hex) TODO: Cyrus 9.3 mm (Tan) + TODO: Cyrus 9.3 mm (Tan) + Cyrus 9.3 mm (Tan) TODO: 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 TODO: Mk14 7.62 mm (Camo) + TODO: Mk14 7.62 mm (Camo) + Mk 14 7.62 mm (Camo) TODO: Mk14 7.62 mm (Camuflaje) TODO: Mk14 7.62 mm (Olive) + TODO: Mk14 7.62 mm (Olive) + Mk 14 7.62 mm (Olive) TODO: Mk14 7.62 mm (Oliva) TODO: Navid 9.3 mm + TODO: Navid 9.3 mm + Navid 9.3 mm TODO: 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 (Hex) TODO: Navid 9.3 mm (Tan) + TODO: Navid 9.3 mm (Tan) + Navid 9.3 mm (Tan) TODO: Navid 9.3 mm (Tan) TODO: SPMG .338 + TODO: SPMG .338 + SPMG .338 TODO: SPMG .338 TODO: SPMG .338 (MTP) + TODO: SPMG .338 (MTP) + SPMG .338 (MTP) TODO: SPMG .338 (MTP) TODO: SPMG .338 (Black) + TODO: SPMG .338 (Black) + SPMG .338 (Noir) TODO: SPMG .338 (Negro) TODO: SPMG .338 (Sand) + TODO: SPMG .338 (Sand) + SPMG .338 (Beige) TODO: SPMG .338 (Arena) - \ No newline at end of file + diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index 372292de89b..02f50143790 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -25,7 +25,7 @@ class CfgPatches { class ACE_Settings { class GVAR(DisplayText) { typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; value = 1; displayName = "$STR_ACE_reload_SettingDisplayTextName"; description = "$STR_ACE_reload_SettingDisplayTextDesc"; diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index 50ec5beee6d..7c401fec05c 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -1,57 +1,69 @@  - - - Check ammo on weapon reload - Prüfe Munition beim Nachladen - Vérifier munitions au rechargement - Comprovar munición al recargar el arma - Проверять боезапас при перезарядке - - - Check the ammo in your new magazine on magazine reload. - Prüfe nachgeladenes Magazin - Vérifie les munitions disponibles dans le nouveau chargeur - Comprueva la munición del nuevo cargador al recargar. - Проверяет количество патронов в новом магазине при перезарядке. - - - 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 - Gurt herstellen - Attacher bande - Enlazar cinta - Сцепить ленты - - - Linking belt... - Stelle Gurt her.... - Attachement de la bande .. - Enlazando cinta... - Сцепка лент ... - - + + + 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 + Lőszer ellenőrzése a fegyver újratöltésekor + + + 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 + A lőszer ellenőrzése az új tárad behelyezésekor újratöltés közben. + + + 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 + Töltényheveder összekötése + + + Linking belt... + Attache d'une bande + Enlazando cinta... + Сцепка лент ... + Spojuji pás... + Podłączanie taśmy... + Gurt anhängen ... + Töltényheveder összekötése folyamatban... + + diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index f6ad07e3578..bf14b9b6911 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -32,7 +32,7 @@ private ["_onSuccess", "_onFailure", "_condition"]; _onSuccess = { (_this select 0 select 0) removeMagazine (_this select 0 select 3); - ["reloadLauncher", _this select 0 select 0, _this select 0] call DEFUNC(common,targetEvent); + ["reloadLauncher", _this select 0 select 1, _this select 0] call DEFUNC(common,targetEvent); [localize "STR_ACE_ReloadLaunchers_LauncherLoaded"] call DEFUNC(common,displayTextStructured); }; diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index 814e3c960a0..ff5637eaf61 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -1,4 +1,5 @@  + @@ -6,24 +7,40 @@ Panzerabwehr laden Cargar lanzador Зарядить ПУ + Nabít odpalovač + Załaduj wyrzutnię + Charger lanceur + Kilövö betöltése Loading launcher ... + Chargement du lanceur Panzerabwehr wird geladen ... Cargando lanzador ... Зарядка ПУ ... + Nabíjím odpalovač ... + Ładowanie wyrzutni ... + Kilövő betöltés alatt ... Launcher loaded + Lanceur chargé Panzerabwehr geladen Lanzador cargado ПУ заряжено + Odpalovač nabit + Wyrzutnia załadowana + Kilövő betöltve Load %1 + Charge %1 Lade %1 Cargar %1 Загрузка %1 + Nabít %1 + Załadowano %1 + %1 betöltése diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 705ca05ecfa..1220d87cae7 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,29 +1,45 @@  - - - Deploy in 5 seconds ... - Wird in 5 Sekunden errichtet ... - Desplegando en 5 segundos ... - Возрождение через 5 секунд ... - - - Rallypoint deployed - Rallypoint errichtet - Punto de reunión desplegado - Точка сбора установлена - - - Teleported to Base - Zur Basis teleportiert - Teletransportado a base - Телепорт на базу - - - Teleported to Rallypoint - Zum Rallypoint teleportiert - Teletransportado al punto de reunión - Телепорт на точку сбора - - + + + Deploy in 5 seconds ... + Déploiement dans 5 secondes ... + Wird in 5 Sekunden errichtet ... + Desplegando en 5 segundos ... + Возрождение через 5 секунд ... + Rozmieszczenie za 5 sekund ... + Respawn za 5 sekund... + Kihelyezés 5 másodperc múlva ... + + + Rallypoint deployed + Point de ralliement déployé + Rallypoint errichtet + Punto de reunión desplegado + Точка сбора установлена + Punkt zbiórki rozmieszczony + Rallypoint umístěn + Gyülekezőpont elhelyezve + + + Teleported to Base + Téléporté à la base + Zur Basis teleportiert + Teletransportado a base + Телепорт на базу + Przeteleportowano do bazy + Odteleportován na základnu + Bázisra teleportálva + + + Teleported to Rallypoint + Téléporté au point de déploiement + Zum Rallypoint teleportiert + Teletransportado al punto de reunión + Телепорт на точку сбора + Przeteleportowano do punktu zbiórki + Odteleportován na rallypoint + Gyülekezőpontra teleportálva + + diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index ff6a76d8343..aa13029547d 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -1,6 +1,8 @@ // by esteldunedain #include "script_component.hpp" +if (!hasInterface) exitWith {}; + //["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler); //@todo addEventHandler infoDisplayChanged with select 1 == "Soldier" diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index 9684babfdfd..40691bd7da7 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -1,42 +1,45 @@  - - - - Safe Mode - Waffe sichern - Seguro puesto - Bezpiecznik - Pojistka - Veszélytelenités - Предохранитель - - - Take off Safety - Waffe entsichern - Quitar seguro - Zwolnij bezpiecznik - Uvolnit pojistku - Veszélyesités - Снять с предохранителя - - - Put on Safety - Waffe gesichert - Poner seguro - Zabezpiecz broń - Přepnout pojistku - Veszélytelenitve - Поставить на предохранитель - - - Took off Safety - Waffe entsichert - Seguro quitado - Odbezpieczono broń - Odstranit pojistku - veszélyes - Снят с предохранителя - - - \ No newline at end of file + + + Safe Mode + Waffe sichern + Seguro puesto + Bezpiecznik + Pojistka + Biztonságos mód + Предохранитель + Sécurité + + + Take off Safety + Waffe entsichern + Quitar seguro + Zwolnij bezpiecznik + Uvolnit pojistku + Biztonsági kapcsoló eltolása + Снять с предохранителя + Enlever sécurité + + + Put on Safety + Waffe gesichert + Poner seguro + Zabezpieczono broń + Přepnout pojistku + Biztonsági kapcsoló helyretolása + Поставить на предохранитель + Sécurité mise + + + Took off Safety + Waffe entsichert + Seguro quitado + Odbezpieczono broń + Odstranit pojistku + Biztonságos mód megszüntetve + Снят с предохранителя + Sécurité enlevée + + + diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp new file mode 100644 index 00000000000..7653fe0443a --- /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 67898fb449b..6ca522ced79 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 1084a41181a..ca4017222a6 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 e574cc72d4d..d45f50c1bb4 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 d94e066767e..42be2830442 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 6e71a391aa2..76c62a4688b 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] +}; + +if (isNil QGVAR(Optics)) then { + GVAR(Optics) = ["", "", ""]; }; -_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]; +_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"); -// Change the adjustment array -_adjustment set [_weaponIndex, _zeroing]; -[_unit, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); +if ((count _maxHorizontal < 2) or (count _maxVertical < 2)) exitWith {false}; -playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] select floor random 3); +_zeroing = _adjustment select _weaponIndex; +_elevation = _zeroing select 0; +_windage = _zeroing select 1; +_zero = _zeroing select 2; -// slightly rotate the player if looking through optic -if (cameraView == "GUNNER") then { +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 }; +}; - _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) +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) }; + }; +}; -} else { +_elevation = round(_elevation * 10) / 10; +_windage = round(_windage * 10) / 10; - [] call FUNC(showZeroing); +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 00000000000..4dbab48f49f --- /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 00000000000..6bb72558b18 --- /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 eda08dc0eed..00000000000 --- 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 00000000000..c9663ea7116 --- /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 8185e00ea08..8753019931d 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 c83112c8a6c..af4b3471240 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 bd1a04f326b..a8df650374e 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 8c4a2cb1cde..5cdb74207d9 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 04f777241ab..9e070efa73e 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -1,50 +1,41 @@  - - - - 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 - Влево на уровне - - - \ No newline at end of file + + + 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 + + + diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 81cde4b007c..c95da37337c 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,22 +1,25 @@  - - - - Switched unit - Einheit gewechselt - Юнит переключен - Prohozená jednotka - Przełącz jednostkę - Cambiado de unidad - - - 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. - - - \ No newline at end of file + + + Switched unit + Einheit gewechselt + Юнит переключен + Prohozená jednotka + Przełącz jednostkę + Cambiado de unidad + Unité changée + Egység átváltva + + + 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 + Ez az egység túl közel van az ellenséghez. + + + diff --git a/addons/vector/XEH_postInit.sqf b/addons/vector/XEH_postInit.sqf index 8bbf7d7aa67..12f643ece32 100644 --- a/addons/vector/XEH_postInit.sqf +++ b/addons/vector/XEH_postInit.sqf @@ -1,4 +1,16 @@ // by commy2 #include "script_component.hpp" +if (!hasInterface) exitWith {}; + +GVAR(holdKeyHandler) = -1; +GVAR(isKeyDownAzimuth) = false; +GVAR(isKeyDownDistance) = false; +GVAR(keyDownTimeAzimuth) = -1; +GVAR(keyDownTimeDistance) = -1; +GVAR(useMil) = false; +GVAR(useFeet) = false; +GVAR(modeReticle) = 0; +GVAR(illuminate) = false; + #include "initKeybinds.sqf" diff --git a/addons/vector/XEH_preInit.sqf b/addons/vector/XEH_preInit.sqf index fcae0f282b4..f170198a159 100644 --- a/addons/vector/XEH_preInit.sqf +++ b/addons/vector/XEH_preInit.sqf @@ -31,14 +31,6 @@ PREP(showText); PREP(nextMode); PREP(adjustBrightness); PREP(showReticle); - -GVAR(holdKeyHandler) = -1; -GVAR(isKeyDownAzimuth) = false; -GVAR(isKeyDownDistance) = false; -GVAR(keyDownTimeAzimuth) = -1; -GVAR(keyDownTimeDistance) = -1; -GVAR(useMil) = false; -GVAR(useFeet) = false; -GVAR(modeReticle) = 0; +PREP(illuminate); ADDON = true; diff --git a/addons/vector/functions/fnc_adjustBrightness.sqf b/addons/vector/functions/fnc_adjustBrightness.sqf index 88323297964..13c604315d0 100644 --- a/addons/vector/functions/fnc_adjustBrightness.sqf +++ b/addons/vector/functions/fnc_adjustBrightness.sqf @@ -26,3 +26,7 @@ _color = [[1,0,0,0.5], [1,0,0,1]] select (_this select 0); (_dlgVector displayCtrl 1322) ctrlSetTextColor _color; (_dlgVector displayCtrl 1323) ctrlSetTextColor _color; (_dlgVector displayCtrl 1324) ctrlSetTextColor _color; + +GVAR(illuminate) = _this select 0; + +_this call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf new file mode 100644 index 00000000000..0c3779e441f --- /dev/null +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -0,0 +1,41 @@ +// by commy2 +#include "script_component.hpp" + +private "_dlgVector"; + +disableSerialization; +_dlgVector = GETUVAR(ACE_dlgVector,displayNull); + +if (_this select 0) then { + + { + private ["_string", "_index"]; + + _string = ctrlText _x; + _index = _string find ".paa"; + + if (_index != -1 && {_string find "_illum.paa" == -1}) then { + _string = toArray _string; + _string resize _index; + + _x ctrlSetText format ["%1_illum.paa", toString _string]; + }; + } forEach allControls _dlgVector; + +} else { + + { + private ["_string", "_index"]; + + _string = ctrlText _x; + _index = _string find "_illum.paa"; + + if (_index != -1) then { + _string = toArray _string; + _string resize _index; + + _x ctrlSetText format ["%1.paa", toString _string]; + }; + } forEach allControls _dlgVector; + +}; diff --git a/addons/vector/functions/fnc_showAzimuth.sqf b/addons/vector/functions/fnc_showAzimuth.sqf index d4b5421cc33..42e874d83c8 100644 --- a/addons/vector/functions/fnc_showAzimuth.sqf +++ b/addons/vector/functions/fnc_showAzimuth.sqf @@ -16,3 +16,5 @@ _digits = _direction call FUNC(convertToTexturesDegree); (_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showAzimuthInclination.sqf b/addons/vector/functions/fnc_showAzimuthInclination.sqf index 9d5bb825063..3daed0d4df2 100644 --- a/addons/vector/functions/fnc_showAzimuthInclination.sqf +++ b/addons/vector/functions/fnc_showAzimuthInclination.sqf @@ -25,3 +25,5 @@ _digits = [_direction select 1] call FUNC(convertToTexturesDegree); (_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showCenter.sqf b/addons/vector/functions/fnc_showCenter.sqf index 58899ff1e7c..1293e1286db 100644 --- a/addons/vector/functions/fnc_showCenter.sqf +++ b/addons/vector/functions/fnc_showCenter.sqf @@ -8,3 +8,5 @@ Shows or hides the vectors center square thingy. #include "script_component.hpp" ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_center.paa))] select (_this select 0)); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showDistance.sqf b/addons/vector/functions/fnc_showDistance.sqf index 69d17faa9ef..540bd018241 100644 --- a/addons/vector/functions/fnc_showDistance.sqf +++ b/addons/vector/functions/fnc_showDistance.sqf @@ -16,3 +16,5 @@ _digits = [_distance] call FUNC(convertToTexturesDistance); (_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showFallOfShot.sqf b/addons/vector/functions/fnc_showFallOfShot.sqf index 45a2232daff..24d933815dd 100644 --- a/addons/vector/functions/fnc_showFallOfShot.sqf +++ b/addons/vector/functions/fnc_showFallOfShot.sqf @@ -53,3 +53,5 @@ if !(_this select 0) then { (_dlgVector displayCtrl 1319) ctrlSetText ""; }; + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showHeightDistance.sqf b/addons/vector/functions/fnc_showHeightDistance.sqf index cc563ae11d1..67dde19547b 100644 --- a/addons/vector/functions/fnc_showHeightDistance.sqf +++ b/addons/vector/functions/fnc_showHeightDistance.sqf @@ -25,3 +25,5 @@ _digits = [_heightDistance select 1] call FUNC(convertToTexturesDistance); (_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showP1.sqf b/addons/vector/functions/fnc_showP1.sqf index 6d7baf74126..73453961c1c 100644 --- a/addons/vector/functions/fnc_showP1.sqf +++ b/addons/vector/functions/fnc_showP1.sqf @@ -23,3 +23,5 @@ if (_this select 0) then { (_dlgVector displayCtrl 1323) ctrlSetText ""; (_dlgVector displayCtrl 1324) ctrlSetText ""; }; + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf index 7dfc1575715..e7c4378866e 100644 --- a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf @@ -25,3 +25,5 @@ _digits = [_azimuthDistance select 1] call FUNC(convertToTexturesDistance); (_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showRelativeHeightLength.sqf b/addons/vector/functions/fnc_showRelativeHeightLength.sqf index 599195f3761..7fed1227865 100644 --- a/addons/vector/functions/fnc_showRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_showRelativeHeightLength.sqf @@ -25,3 +25,5 @@ _digits = [_heightLength select 1] call FUNC(convertToTexturesDistance); (_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); (_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); (_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showReticle.sqf b/addons/vector/functions/fnc_showReticle.sqf index a3c07010dc8..d44adfb68d8 100644 --- a/addons/vector/functions/fnc_showReticle.sqf +++ b/addons/vector/functions/fnc_showReticle.sqf @@ -8,3 +8,5 @@ Shows or hides the electronic reticle. #include "script_component.hpp" ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_crosshair.paa))] select (_this select 0)); + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showText.sqf b/addons/vector/functions/fnc_showText.sqf index 33e1c4766f5..68dbe9d642c 100644 --- a/addons/vector/functions/fnc_showText.sqf +++ b/addons/vector/functions/fnc_showText.sqf @@ -153,3 +153,5 @@ switch (_this select 0) do { (_dlgVector displayCtrl 1324) ctrlSetText ""; }; }; + +[GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/rsc/vector_0_illum.paa b/addons/vector/rsc/vector_0_illum.paa new file mode 100644 index 00000000000..74f5af5a167 Binary files /dev/null and b/addons/vector/rsc/vector_0_illum.paa differ diff --git a/addons/vector/rsc/vector_1_illum.paa b/addons/vector/rsc/vector_1_illum.paa new file mode 100644 index 00000000000..f486e82faa5 Binary files /dev/null and b/addons/vector/rsc/vector_1_illum.paa differ diff --git a/addons/vector/rsc/vector_2_illum.paa b/addons/vector/rsc/vector_2_illum.paa new file mode 100644 index 00000000000..41c5db21a80 Binary files /dev/null and b/addons/vector/rsc/vector_2_illum.paa differ diff --git a/addons/vector/rsc/vector_3_illum.paa b/addons/vector/rsc/vector_3_illum.paa new file mode 100644 index 00000000000..1a466bbcb4a Binary files /dev/null and b/addons/vector/rsc/vector_3_illum.paa differ diff --git a/addons/vector/rsc/vector_4_illum.paa b/addons/vector/rsc/vector_4_illum.paa new file mode 100644 index 00000000000..50ffff1d491 Binary files /dev/null and b/addons/vector/rsc/vector_4_illum.paa differ diff --git a/addons/vector/rsc/vector_5_illum.paa b/addons/vector/rsc/vector_5_illum.paa new file mode 100644 index 00000000000..704aba781f7 Binary files /dev/null and b/addons/vector/rsc/vector_5_illum.paa differ diff --git a/addons/vector/rsc/vector_6_illum.paa b/addons/vector/rsc/vector_6_illum.paa new file mode 100644 index 00000000000..0ed4b7390d3 Binary files /dev/null and b/addons/vector/rsc/vector_6_illum.paa differ diff --git a/addons/vector/rsc/vector_7_illum.paa b/addons/vector/rsc/vector_7_illum.paa new file mode 100644 index 00000000000..b7f597f8dae Binary files /dev/null and b/addons/vector/rsc/vector_7_illum.paa differ diff --git a/addons/vector/rsc/vector_8_illum.paa b/addons/vector/rsc/vector_8_illum.paa new file mode 100644 index 00000000000..76ac62a41f5 Binary files /dev/null and b/addons/vector/rsc/vector_8_illum.paa differ diff --git a/addons/vector/rsc/vector_9_illum.paa b/addons/vector/rsc/vector_9_illum.paa new file mode 100644 index 00000000000..7d2aed09a9e Binary files /dev/null and b/addons/vector/rsc/vector_9_illum.paa differ diff --git a/addons/vector/rsc/vector_a_illum.paa b/addons/vector/rsc/vector_a_illum.paa new file mode 100644 index 00000000000..b6188a951e0 Binary files /dev/null and b/addons/vector/rsc/vector_a_illum.paa differ diff --git a/addons/vector/rsc/vector_b_illum.paa b/addons/vector/rsc/vector_b_illum.paa new file mode 100644 index 00000000000..82c9ed9c646 Binary files /dev/null and b/addons/vector/rsc/vector_b_illum.paa differ diff --git a/addons/vector/rsc/vector_c_illum.paa b/addons/vector/rsc/vector_c_illum.paa new file mode 100644 index 00000000000..c599588d8d9 Binary files /dev/null and b/addons/vector/rsc/vector_c_illum.paa differ diff --git a/addons/vector/rsc/vector_center_illum.paa b/addons/vector/rsc/vector_center_illum.paa new file mode 100644 index 00000000000..d3f6bfb894f Binary files /dev/null and b/addons/vector/rsc/vector_center_illum.paa differ diff --git a/addons/vector/rsc/vector_crosshair_illum.paa b/addons/vector/rsc/vector_crosshair_illum.paa new file mode 100644 index 00000000000..ddef5eccd7b Binary files /dev/null and b/addons/vector/rsc/vector_crosshair_illum.paa differ diff --git a/addons/vector/rsc/vector_d_illum.paa b/addons/vector/rsc/vector_d_illum.paa new file mode 100644 index 00000000000..b16ee7ef30a Binary files /dev/null and b/addons/vector/rsc/vector_d_illum.paa differ diff --git a/addons/vector/rsc/vector_degree_illum.paa b/addons/vector/rsc/vector_degree_illum.paa new file mode 100644 index 00000000000..840713d8cf3 Binary files /dev/null and b/addons/vector/rsc/vector_degree_illum.paa differ diff --git a/addons/vector/rsc/vector_e_illum.paa b/addons/vector/rsc/vector_e_illum.paa new file mode 100644 index 00000000000..28421e11ec7 Binary files /dev/null and b/addons/vector/rsc/vector_e_illum.paa differ diff --git a/addons/vector/rsc/vector_f_illum.paa b/addons/vector/rsc/vector_f_illum.paa new file mode 100644 index 00000000000..bf542f37f4c Binary files /dev/null and b/addons/vector/rsc/vector_f_illum.paa differ diff --git a/addons/vector/rsc/vector_g_illum.paa b/addons/vector/rsc/vector_g_illum.paa new file mode 100644 index 00000000000..382604f6c59 Binary files /dev/null and b/addons/vector/rsc/vector_g_illum.paa differ diff --git a/addons/vector/rsc/vector_i_illum.paa b/addons/vector/rsc/vector_i_illum.paa new file mode 100644 index 00000000000..456b14c6ee1 Binary files /dev/null and b/addons/vector/rsc/vector_i_illum.paa differ diff --git a/addons/vector/rsc/vector_l_illum.paa b/addons/vector/rsc/vector_l_illum.paa new file mode 100644 index 00000000000..b0e0cfccce2 Binary files /dev/null and b/addons/vector/rsc/vector_l_illum.paa differ diff --git a/addons/vector/rsc/vector_minus_illum.paa b/addons/vector/rsc/vector_minus_illum.paa new file mode 100644 index 00000000000..6e66787a36c Binary files /dev/null and b/addons/vector/rsc/vector_minus_illum.paa differ diff --git a/addons/vector/rsc/vector_n_illum.paa b/addons/vector/rsc/vector_n_illum.paa new file mode 100644 index 00000000000..44d31d9654f Binary files /dev/null and b/addons/vector/rsc/vector_n_illum.paa differ diff --git a/addons/vector/rsc/vector_o_illum.paa b/addons/vector/rsc/vector_o_illum.paa new file mode 100644 index 00000000000..ecf355c1105 Binary files /dev/null and b/addons/vector/rsc/vector_o_illum.paa differ diff --git a/addons/vector/rsc/vector_p_illum.paa b/addons/vector/rsc/vector_p_illum.paa new file mode 100644 index 00000000000..c3c8da6a8b7 Binary files /dev/null and b/addons/vector/rsc/vector_p_illum.paa differ diff --git a/addons/vector/rsc/vector_plus_illum.paa b/addons/vector/rsc/vector_plus_illum.paa new file mode 100644 index 00000000000..f9259c06dee Binary files /dev/null and b/addons/vector/rsc/vector_plus_illum.paa differ diff --git a/addons/vector/rsc/vector_r_illum.paa b/addons/vector/rsc/vector_r_illum.paa new file mode 100644 index 00000000000..b60b65202d6 Binary files /dev/null and b/addons/vector/rsc/vector_r_illum.paa differ diff --git a/addons/vector/rsc/vector_t_illum.paa b/addons/vector/rsc/vector_t_illum.paa new file mode 100644 index 00000000000..49af435989a Binary files /dev/null and b/addons/vector/rsc/vector_t_illum.paa differ diff --git a/addons/vector/rsc/vector_u_illum.paa b/addons/vector/rsc/vector_u_illum.paa new file mode 100644 index 00000000000..42a0df66af8 Binary files /dev/null and b/addons/vector/rsc/vector_u_illum.paa differ diff --git a/addons/vector/stringtable.xml b/addons/vector/stringtable.xml index 7a27cf272ea..05289d189fe 100644 --- a/addons/vector/stringtable.xml +++ b/addons/vector/stringtable.xml @@ -1,54 +1,54 @@  - + - - - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - Vector IV - - - Rangefinder - Laserentfernungsmesser - Telémetro - Télémètre - Dalmierz - Dálkoměr - Telemetro - Távolságmérő - Telêmetro - Дальномер - - - Vector - Azimuth Key - Vector - Azimuth-Taste - Vector - Tecla de acimut - Vector - Touche Azimuth - Vector - Azymut - Vector - Zobrazit Azimut - Vector - Tasto Azimuth - Vector - Tecla de Azimute - Vector - Irányszög gomb - Vector – Азимут - - - Vector - Distance Key - Vector - Entfernungs-Taste - Vector - Tecla de distancia - Vector - Touche Distance - Vector - Odległość - Vector - Zobrazit vzdálenost - Vecto - Tasto Distanza - Vector - Tecla de Distância - Vector - Távolság gomb - Vector – Расстояние - - + + + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + Vector IV + + + Rangefinder + Laserentfernungsmesser + Telémetro + Télémètre + Dalmierz laserowy + Dálkoměr + Telemetro + Távolságmérő + Telêmetro + Дальномер + + + Vector - Azimuth Key + Vector - Azimuth-Taste + Vector - Tecla de acimut + Vector - Touche Azimuth + Vector - Azymut + Vector - Zobrazit azimut + Vector - Tasto Azimuth + Vector - Tecla de Azimute + Vector - Irányszög gomb + Vector – Азимут + + + Vector - Distance Key + Vector - Entfernungs-Taste + Vector - Tecla de distancia + Vector - Touche Distance + Vector - Odległość + Vector - Zobrazit vzdálenost + Vecto - Tasto Distanza + Vector - Tecla de Distância + Vector - Távolság gomb + Vector – Расстояние + + \ No newline at end of file diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 580283dcab8..a327352f9b4 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,116 +1,115 @@  - - - - Unlock Vehicle - Fahrzeug aufschließen - Vehículo abierto - Déverrouiller le véhicule - Odblokuj pojazd - Odemknout vozidlo - Jármű nyitása - Открыть машину - - - Lock Vehicle - Fahrzeug abschließen - Vehículo cerrado - Verrouiller le véhicule - Zablokuj pojazd - Zamknout vozidlo - Jármű zárása - Закрыть машину - - - Lockpick Vehicle - Fahrzeug knacken - Forzar vehículo - Crocheter le véhicule - Otwórz zamek - Vypáčit vozidlo - Jármű feltörése - Взломать замок - - - Picking Lock.... - Schloss knacken... - Forzando cierre... - Crochetage... - Otwieranie zamka... - Páčim vozidlo... - Feltörés... - Взламываем замок... - - - A custom key that will open a specific vehicle. - Ein Schlüssel der ein bestimmtes Fahrzeug aufschließt. - Una llave concreta abrirá un vehículo concreto. - Une clé propre à un seul véhicule. - Unikatowy klucz który otworzy konkretny pojazd. - Vlastní klíč, který otevře konkrétní vozidlo. - Kulcs egy járműhez - Ключ от конкретной машины. - - - A Master Key will open any lock, no matter what! - Ein Generalschlüssel der jedes Schloss öffnet... - Una llave maestra abrirá cualquier cierre, no importa cual! - Un passe-partout qui ouvrira n'importe quelle serrure. - Uniwersalny klucz który otworzy każdy zamek. - Hlavní klíč otevře libovolný zámek, bez vyjímek! - Általános kulcs minden járműhez - Универсальный ключ, открывающий любой замок. - - - A lockpick set that can pick the locks of most vehicles. - Ein Dietrich der die meisten Fahrzeugschlösser knacken kann... - Un set de ganzúas puede abrir la mayoría de cerraduras de vehículos. - Un crochet qui ouvrira la plupart des véhicules. - Zestaw wytrychów dzięki któremu można otworzyć zamki w większości pojazdów. - Sada paklíčů, která dokáže odemknout zámky u většiny vozidel. - Álkulcs melyik minden járműt nyitni tud - Набор отмычек, которым можно взломать почти любую машину. - - - 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. - 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 - Ключ для открытия большинства машин Запада. - - - 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. - 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. - Ключ для открытия большинства машин Востока. - - - A key that should open most INDEP vehicle. - Ein Schlüssel der die meisten Fahrzeuge der Aufständischen öffnen sollte... - Una llave que puede abrir la mayoría de vehículos independientes. - Une clé qui ouvrira la plupart des véhicules INDEP. - Klucz który powinien otworzyć większość pojazdów INDFOR. - Általános kulcs INDEPENDENT járművekhez - Klíč který by měl otevřít většinu Nezávislých vozidel. - Ключ для открытия большинства машин Независимых. - - - A key that should open most CIV vehicle. - Ein Schlüssel der die meisten zivilen Fahrzeuge öffnen sollte... - Una llave que puede abrir la mayoría de vehículos civiles. - Une clé qui ouvrira la plupart des véhicules CIV. - Klucz który powinien otworzyć większość pojazdów CYWILNYCH. - Klíč který by měl otevřít většinu Civilních vozidel. - Általános kulcs CIVILIAN járművekhez - Ключ для открытия большинства машин Гражданских. - - - \ No newline at end of file + + + Unlock Vehicle + Fahrzeug aufschließen + Vehículo abierto + Déverrouiller le véhicule + Odblokuj pojazd + Odemknout vozidlo + Jármű nyitása + Открыть машину + + + Lock Vehicle + Fahrzeug abschließen + Vehículo cerrado + Verrouiller le véhicule + Zablokuj pojazd + Zamknout vozidlo + Jármű zárása + Закрыть машину + + + Lockpick Vehicle + Fahrzeug knacken + Forzar vehículo + Crocheter le véhicule + Otwórz zamek + Vypáčit vozidlo + Jármű feltörése + Взломать замок + + + Picking Lock.... + Schloss knacken... + Forzando cierre... + Crochetage... + Otwieranie zamka... + Páčim vozidlo... + Zár feltörése... + Взламываем замок... + + + A custom key that will open a specific vehicle. + Ein Schlüssel der ein bestimmtes Fahrzeug aufschließt. + Una llave concreta abrirá un vehículo concreto. + Une clé propre à un seul véhicule. + Unikatowy klucz, który otworzy konkretny pojazd. + Vlastní klíč, který otevře konkrétní vozidlo. + Egy egyedi kulcs, ami egy meghatározott járművet nyit ki. + Ключ от конкретной машины. + + + A Master Key will open any lock, no matter what! + Ein Generalschlüssel der jedes Schloss öffnet... + Una llave maestra abrirá cualquier cierre, no importa cual! + Un passe-partout qui ouvrira n'importe quelle serrure. + Uniwersalny klucz, który otworzy każdy zamek. + Hlavní klíč otevře libovolný zámek, bez vyjímek! + Egy főkulcs, ami minden zárat kinyit, helyzettől függetlenül! + Универсальный ключ, открывающий любой замок. + + + A lockpick set that can pick the locks of most vehicles. + Ein Dietrich der die meisten Fahrzeugschlösser knacken kann... + Un set de ganzúas puede abrir la mayoría de cerraduras de vehículos. + Un crochet qui ouvrira la plupart des véhicules. + Zestaw wytrychów, dzięki któremu można otworzyć zamki w większości pojazdów. + Sada paklíčů, která dokáže odemknout zámky u většiny vozidel. + Egy tolvajkulcs-készlet, mely a legtöbb jármű zárjait fel tudja törni. + Набор отмычек, которым можно взломать почти любую машину. + + + 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 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. + Egy kulcs, ami a NYUGAT egységeinek legtöbb járművét ki tudja nyitni. + Ключ для открытия большинства машин Запада. + + + 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 EST. + Klucz, który powinien otworzyć większość pojazdów WSCHODU. + Egy kulcs, ami a KELET egységeinek legtöbb járművét ki tudja nyitni. + Klíč který by měl otevřít vetšinu Východních vozidel. + Ключ для открытия большинства машин Востока. + + + A key that should open most INDEP vehicle. + Ein Schlüssel der die meisten Fahrzeuge der Aufständischen öffnen sollte... + Una llave que puede abrir la mayoría de vehículos independientes. + Une clé qui ouvrira la plupart des véhicules INDEP. + Klucz, który powinien otworzyć większość pojazdów INDFOR. + Egy kulcs, ami a FÜGGETLEN egységek legtöbb járművét ki tudja nyitni. + Klíč který by měl otevřít většinu Nezávislých vozidel. + Ключ для открытия большинства машин Независимых. + + + A key that should open most CIV vehicle. + Ein Schlüssel der die meisten zivilen Fahrzeuge öffnen sollte... + Una llave que puede abrir la mayoría de vehículos civiles. + Une clé qui ouvrira la plupart des véhicules CIV. + Klucz, który powinien otworzyć większość pojazdów CYWILNYCH. + Klíč který by měl otevřít většinu Civilních vozidel. + Egy kulcs, ami a CIVIL járművek többségét ki tudja nyitni. + Ключ для открытия большинства машин Гражданских. + + + diff --git a/addons/vehicles/XEH_postInit.sqf b/addons/vehicles/XEH_postInit.sqf index 8f714105b69..c7665cf2aa4 100644 --- a/addons/vehicles/XEH_postInit.sqf +++ b/addons/vehicles/XEH_postInit.sqf @@ -7,7 +7,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(speedLimiter), localize "STR_ACE_SpeedLimiter", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isnotinside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player == driver vehicle ACE_player && {vehicle ACE_player isKindOf 'Car' || diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 4fbb91ebcdb..2312ce60278 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -1,43 +1,42 @@ - + + - - - - Speed Limiter on - Begrenzer an - Limitador de velocidad activado - Ogranicznik prędkości włączony - Omezovač rychlosti zapnout - Limiteur de vitesse Activé - Ограничение скорости включено - Sebességkorlát bekapcsolva - Limitador de Velocidade Ativo - Limitatore Attivo - - - Speed Limiter off - Begrenzer aus - Limitador de velocidad desactivado - Ogranicznik prędkości wyłączony - Omezovač rychlosti vypnout - Limiteur de vitesse Désactivé - Ограничение скорости выключено - Sebességkorlát kikapcsolva - Limitador de Velocidade Desativado - Limitatore Non Attivo - - - - Speed Limiter - Begrenzer - Limitador de velocidad - Ogranicznik prędkości - Omezovač rychlosti - Limiteur de vitesse - Ограничение скорости - Sebességkorlát - Limitador de Velocidade - Limitatore di Velocità - - - + + + Speed Limiter on + Begrenzer an + Limitador de velocidad activado + Ogranicznik prędkości włączony + Omezovač rychlosti zapnout + Limiteur de vitesse Activé + Ограничение скорости включено + Sebességkorlátozó bekapcsolva + Limitador de Velocidade Ativo + Limitatore Attivo + + + Speed Limiter off + Begrenzer aus + Limitador de velocidad desactivado + Ogranicznik prędkości wyłączony + Omezovač rychlosti vypnout + Limiteur de vitesse Désactivé + Ограничение скорости выключено + Sebességkorlátozó kikapcsolva + Limitador de Velocidade Desativado + Limitatore Non Attivo + + + Speed Limiter + Begrenzer + Limitador de velocidad + Ogranicznik prędkości + Omezovač rychlosti + Limiteur de vitesse + Ограничение скорости + Sebességkorlátozó + Limitador de Velocidade + Limitatore di Velocità + + + \ No newline at end of file diff --git a/addons/weaponselect/config.cpp b/addons/weaponselect/config.cpp index 80be936e980..68d0fe842d7 100644 --- a/addons/weaponselect/config.cpp +++ b/addons/weaponselect/config.cpp @@ -17,7 +17,7 @@ class CfgPatches { class ACE_Settings { class GVAR(DisplayText) { typeName = "BOOL"; - isClientSetable = 1; + isClientSettable = 1; value = 1; displayName = "$STR_ACE_Weaponselect_SettingDisplayTextName"; description = "$STR_ACE_Weaponselect_SettingDisplayTextDesc"; diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index 56182fcb74a..d534ecd29b4 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -1,259 +1,269 @@  - - - Display text on grenade throw - Zeige Text beim Granatwurf - Mostrar texto al lanzar granada - Показывать текст при броске - - - Display a hint or text on grenade throw. - Zeige Hinweis oder Text beim Granatwurf - Muestra una notificación o texto al lanzar granada - Показывать текст или подсказку при броске гранаты. - - - 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 - - - Ready Grenade - 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 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 + Szöveg mutatása gránát eldobásakor + + + 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 + Jelez egy súgót vagy szöveget a gránát eldobásakor. + + + 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: %1 + Граната %1 + Grenade %1 + + + Ready Grenade + Granate nehmen + Granada lista + Przygotuj granat + Odjistit granát + Gránát előkészítése + Подготовить гранату + 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 semmilyen gránát kiválasztva + 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üstvető eltüzelése + Запустить дымовую завесу + + diff --git a/addons/weather/RscTitles.hpp b/addons/weather/RscTitles.hpp new file mode 100644 index 00000000000..aedebdabfc1 --- /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 9865029c930..c049caf47e6 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 3a11d94cba7..47d996fe67e 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 d9a62f9e819..a9bcd49c1b8 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 00000000000..469cdedadab 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 00000000000..11e19553ffe 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 0151ad37799..585944af45e 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 6b104848da0..16b823a9f30 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 8beeb80d987..a5bd119889a 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 00000000000..43398e2960c 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 2de5cdbd747..3bd9a9c6764 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 f20ced97701..a7bb1d59425 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 adcaf136fae..e51ad530c53 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 d381f0cc9e4..016ca49f7cb 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 caed3aa2549..75e1277fee3 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -10,8 +10,17 @@ 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}, +[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) // Update Wind simulWeatherSync; @@ -54,7 +63,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 f542c522f33..2751e772266 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 3f2bb4e15ad..13e5a0cab26 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 00000000000..61d556a27c3 --- /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 { false }; +if (vehicle ACE_player != ACE_player) exitWith { false }; + +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 ebd37053e35..86a05fb2252 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 00000000000..4827751c6bf --- /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 00000000000..89235fe5af9 --- /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 2371c4b135b..f9362a27119 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 05a606fbc21..bac6a8323ad 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 f515640f12a..e0c77420cfa 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 36b177ae0ab..5ee22ecf4ff 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"]; - - _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; +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}; - _drag = _deltaT * _airFriction * _trueSpeed; - _accel = _trueVelocity vectorMultiply (_drag); - _bulletVelocity = _bulletVelocity vectorAdd _accel; - }; - _bullet setVelocity _bulletVelocity; - // TODO expand with advanced ballistics functionality. +[_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")] call FUNC(updateTrajectoryPFH); - }, 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 00000000000..4cf75c885ad --- /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 85d61e3bccb..00000000000 --- 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 00000000000..9859f330dd2 --- /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 a6ae43ae331..897a3c556bc 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -1,37 +1,57 @@ - + - - - - Wind Information - Informacje o wietrze - Información del viento - Ветер - - - Direction: %1 - Kierunek: %1 - Dirección: %1 - Направление: %1 - - - Speed: %1 m/s - Prędkość: %1 - Velocidad: %1 m/s - Скорость: %1 м/с - - - Weather Information - Informacje o pogodzie - Información Meteorológica - Погода - - - Humidity: %1% - Wilgotność: %1 - Humedad: %1% - Влажность: %1% - - - + + + + Wind Information + Informacje o wietrze + Información del viento + Ветер + Informace o větru + Vent + Windinformationen + Szélinformáció + + + Direction: %1 + Kierunek: %1 + Dirección: %1 + Направление: %1 + Směr: %1 + Direction %1 + Windrichtung: %1 + Irány: %1 + + + Speed: %1 m/s + Prędkość: %1 + Velocidad: %1 m/s + Скорость: %1 м/с + Rychlost: %1 m/s + Vitesse %1 m/s + Geschwindigkeit: %1m/s + Sebesség: %1 m/s + + + Weather Information + Informacje o pogodzie + Información Meteorológica + Погода + Informace o počasí + Météo + Wetterinformationen + Időjárás-Információ + + + Humidity: %1% + Wilgotność: %1 + Humedad: %1% + Влажность: %1% + Vlhkost: %1% + Humidité: %1% + Luftfeuchtigkeit: %1 + Páratartalom: %1% + + + diff --git a/documentation/development/ace3-config-entries.md b/documentation/development/ace3-config-entries.md index f56285052df..cc0104a8b11 100644 --- a/documentation/development/ace3-config-entries.md +++ b/documentation/development/ace3-config-entries.md @@ -1,7 +1,7 @@ --- layout: wiki title: ACE3 Config Entries -group: dev +group: development parent: wiki order: 2 --- diff --git a/documentation/development/ace3-events-system.md b/documentation/development/ace3-events-system.md index 6b708b01ddb..d7c99e558ed 100644 --- a/documentation/development/ace3-events-system.md +++ b/documentation/development/ace3-events-system.md @@ -1,7 +1,7 @@ --- layout: wiki title: ACE3 Events System -group: dev +group: development parent: wiki order: 3 --- diff --git a/documentation/development/arma-3-issues.md b/documentation/development/arma-3-issues.md index 46b68a0447b..3b4a6f036b2 100644 --- a/documentation/development/arma-3-issues.md +++ b/documentation/development/arma-3-issues.md @@ -1,7 +1,7 @@ --- layout: wiki title: Arma 3 Issues -group: dev +group: development parent: wiki order: 6 --- @@ -19,6 +19,7 @@ Keeping track of Arma 3 issues that need to be fixed. If you want to support us * [commy2: 0022671: setVariable is not always JIP persistent](http://feedback.arma3.com/view.php?id=22671) * [CorruptedHeart: 0022318: Can no longer use "MenuBack" shortcut in AddAction](http://feedback.arma3.com/view.php?id=22318) * [James2464: 0023725: All Environment Rocks Should Have PhysX LODs](http://feedback.arma3.com/view.php?id=23725) +* [Jaynus: 0023679: Display event handler return values for mouse buttons should be respected](http://feedback.arma3.com/view.php?id=23679) **Resolved:** diff --git a/documentation/development/arma-3-scheduler-and-our-practices.md b/documentation/development/arma-3-scheduler-and-our-practices.md index 90646b3b4a5..bef02248193 100644 --- a/documentation/development/arma-3-scheduler-and-our-practices.md +++ b/documentation/development/arma-3-scheduler-and-our-practices.md @@ -1,7 +1,7 @@ --- layout: wiki title: Arma 3 Scheduler And Our Practices -group: dev +group: development parent: wiki order: 8 --- diff --git a/documentation/development/coding-guidelines.md b/documentation/development/coding-guidelines.md index c3517dec1d9..f72263eeaab 100644 --- a/documentation/development/coding-guidelines.md +++ b/documentation/development/coding-guidelines.md @@ -1,7 +1,7 @@ --- layout: wiki title: Coding Guidelines -group: dev +group: development parent: wiki order: 1 --- diff --git a/documentation/development/extension-guidelines.md b/documentation/development/extension-guidelines.md index b56349e82be..0558d49d5e8 100644 --- a/documentation/development/extension-guidelines.md +++ b/documentation/development/extension-guidelines.md @@ -1,7 +1,7 @@ --- layout: wiki title: Extension Guidelines -group: dev +group: development parent: wiki order: 9 --- diff --git a/documentation/development/fragmentation-configuration.md b/documentation/development/fragmentation-configuration.md index ab0baa0612f..17ff36fa13a 100644 --- a/documentation/development/fragmentation-configuration.md +++ b/documentation/development/fragmentation-configuration.md @@ -1,7 +1,7 @@ --- layout: wiki title: Fragmentation Configuration -group: dev +group: development parent: wiki order: 7 --- diff --git a/documentation/development/how-to-translate-ace3.md b/documentation/development/how-to-translate-ace3.md index a6f81c3b309..b7e23fa5758 100644 --- a/documentation/development/how-to-translate-ace3.md +++ b/documentation/development/how-to-translate-ace3.md @@ -1,7 +1,7 @@ --- layout: wiki title: How to translate ACE3 -group: dev +group: development parent: wiki order: 20 --- diff --git a/documentation/development/merging-pull-requests.md b/documentation/development/merging-pull-requests.md index 2e754efe93f..6bc34464f0a 100644 --- a/documentation/development/merging-pull-requests.md +++ b/documentation/development/merging-pull-requests.md @@ -1,7 +1,7 @@ --- layout: wiki title: Merging Pull Requests -group: dev +group: development parent: wiki order: 5 --- @@ -33,4 +33,4 @@ Non-trivial pull requests remain open for a minimum of 48 hours, to give all oth If a pull request adds a new addon, or changes something else, like the README, everyone has 72 hours to comment on the changes. After that, one of the team leads ([NouberNou](https://github.com/NouberNou), [KoffeinFlummi](https://github.com/KoffeinFlummi), [Glowbal](https://github.com/Glowbal)) will merge it. -Trivial changes such as spelling fixes can be merged immediately by any contributor. \ No newline at end of file +Trivial changes such as spelling fixes can be merged immediately by any contributor. diff --git a/documentation/development/modularity-and-pbo-structure.md b/documentation/development/modularity-and-pbo-structure.md index b992455db7d..ad1194e39cd 100644 --- a/documentation/development/modularity-and-pbo-structure.md +++ b/documentation/development/modularity-and-pbo-structure.md @@ -1,7 +1,7 @@ --- layout: wiki title: Modularity And PBO Structure -group: dev +group: development parent: wiki order: 4 --- diff --git a/documentation/development/setting-up-the-development-environment.md b/documentation/development/setting-up-the-development-environment.md index 3d0f0b19370..fe76ca6a20a 100644 --- a/documentation/development/setting-up-the-development-environment.md +++ b/documentation/development/setting-up-the-development-environment.md @@ -1,7 +1,7 @@ --- layout: wiki title: Setting Up The Development Environment -group: dev +group: development parent: wiki order: 0 --- @@ -70,12 +70,12 @@ mklink /D "[Arma 3 installation folder]\z\ace" "[location of the ACE3 project]" mklink /D "P:\z\ace" "[location of the ACE3 project]" ``` -Then, copy the `cba` folder from the `tools` folder to `P:\x\cba`. Create the `x` folder if needed. That folder contains the part of the CBA source code that are required for the macros to work. +Then, copy the `cba` folder from the `tools` folder to `P:\x\cba`. Create the `x` folder if needed. That folder contains the parts of the CBA source code that are required for the macros to work. ## Creating a Test Build -To create a development build of ACE to test changes or to debug something, run the `build.bat` file in the `tools` folder. This will populate the `addons` folder with binarized PBOs. These PBOs still point to the source files in their respective folders however, which allows you to use [file patching](#file-patching). +To create a development build of ACE to test changes or to debug something, run the `build.py` file in the `tools` folder. This will populate the `addons` folder with binarized PBOs. These PBOs still point to the source files in their respective folders however, which allows you to use [file patching](#file-patching). This also means that you cannot distribute this build to others. diff --git a/documentation/missionmaker/modules.md b/documentation/missionmaker/modules.md index 1ea5b6c4eba..0b0f13f8d6f 100644 --- a/documentation/missionmaker/modules.md +++ b/documentation/missionmaker/modules.md @@ -1,7 +1,7 @@ --- layout: wiki title: Modules -group: missionMaker +group: missionmaker order: 5 parent: wiki --- diff --git a/documentation/user/how-to-make-a-feature-request.md b/documentation/user/how-to-make-a-feature-request.md index 7a317a2c5f2..bfc5401f38a 100644 --- a/documentation/user/how-to-make-a-feature-request.md +++ b/documentation/user/how-to-make-a-feature-request.md @@ -8,7 +8,7 @@ parent: wiki ### Before requesting -ACE 2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the mayority of them eventually. However, due to time constraints, we have only managed to do a fraction of the job so far. +ACE 2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the majority of them eventually. However, due to time constraints, we have only managed to do a fraction of the job so far. There's really no point on making feature requests for anything included or planned for inclusion in ACE2, AGM or CSE. The majority of those things are been considered for porting or rewritting already. @@ -21,4 +21,4 @@ There's really no point on making feature requests for anything included or plan In order not to spam the issue tracker with duplicated requests, we have have created a single Issue for feature request. Any and all requests should be done there, where they will get discussed and evaluated. Before posting a new one, please make sure to check the previous entries on the thread and make a quick search; please don't reiterate requests that had already been either accepted for inclusion or disregarded. -Accepted feature requests may be moved to a sepparate issue by moderators for further discussion. +Accepted feature requests may be moved to a separate issue by moderators for further discussion. diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index f0e21e92076..60287715548 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -27,5 +27,7 @@ include_directories(AFTER "common") # Add extensions to build here add_subdirectory(fcs) +add_subdirectory(breakLine) +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 00000000000..2851d6576bd --- /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 00000000000..f579339a04b --- /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/extensions/breakLine/CMakeLists.txt b/extensions/breakLine/CMakeLists.txt new file mode 100644 index 00000000000..8981ec487e8 --- /dev/null +++ b/extensions/breakLine/CMakeLists.txt @@ -0,0 +1,11 @@ +set(ACE_EXTENSION_NAME "ace_breakLine") + +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/extensions/breakLine/ace_breakLine.cpp b/extensions/breakLine/ace_breakLine.cpp new file mode 100644 index 00000000000..74a32cc66d1 --- /dev/null +++ b/extensions/breakLine/ace_breakLine.cpp @@ -0,0 +1,79 @@ +/* + * ace_breakLine.cpp + * + * Takes a string and insert as many line breaks as needed so it fits a given width + * + * Takes: + * Localized string as string + * Example: "Check weapon temperature" + * + * Returns: + * String with line breaks + */ + +#include "ace_common.h" + +#include +#include +#include + +#define MAXCHARACTERS 14 + +static char version[] = "1.0"; + +extern "C" { + __declspec (dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function); +}; + +std::vector splitString(std::string input) { + std::istringstream ss(input); + std::string token; + + std::vector output; + while (std::getline(ss, token, ' ')) { + output.push_back(token); + } + + return output; +} + +std::string addLineBreaks(const std::vector &words) { + + std::stringstream sstream; + int numChar = 0; + int i = 0; + while (i < words.size()) { + if (numChar == 0) { + sstream << words[i]; + numChar += words[i].size(); + i++; + } else { + if (numChar + 1 + words[i].size() > MAXCHARACTERS) { + sstream << "
"; + numChar = 0; + } else { + sstream << " " << words[i]; + numChar += 1 + words[i].size(); + i++; + } + } + } + return sstream.str(); +} + +// i like to live dangerously. jk, fix strncpy sometime pls. +#pragma warning( push ) +#pragma warning( disable : 4996 ) + +void __stdcall RVExtension(char *output, int outputSize, const char *function) { + //strncpy(output, function, outputSize); + + if (!strcmp(function, "version")) { + strncpy(output, version, outputSize); + } else { + strcpy(output, addLineBreaks(splitString(function)).c_str()); + output[outputSize - 1] = '\0'; + } +} + +#pragma warning( pop ) diff --git a/extensions/fcs/ace_fcs.cpp b/extensions/fcs/ace_fcs.cpp index a1a3b64ba73..9ab49390582 100644 --- a/extensions/fcs/ace_fcs.cpp +++ b/extensions/fcs/ace_fcs.cpp @@ -12,7 +12,7 @@ */ #include "ace_common.h" - + #define _USE_MATH_DEFINES #include @@ -113,9 +113,11 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) { double distance = std::stod(argStrings[3]); double result = getSolution(initSpeed, airFriction, angleTarget, distance); - std::string resultString = std::to_string(result); - strcpy(output, resultString.c_str()); + std::stringstream sstream; + sstream << result; + + strcpy(output, sstream.str().c_str()); output[outputSize - 1] = '\0'; } } diff --git a/extras/K4500_Instruction_Manual_English.pdf b/extras/K4500_Instruction_Manual_English.pdf new file mode 100644 index 00000000000..a3096109c64 Binary files /dev/null and b/extras/K4500_Instruction_Manual_English.pdf differ diff --git a/extras/assets/icons/Icons_Actions.psd b/extras/assets/icons/Icons_Actions.psd new file mode 100644 index 00000000000..616ab7a7fa7 Binary files /dev/null and b/extras/assets/icons/Icons_Actions.psd differ diff --git a/extras/assets/icons/png/Icon_Actions/disarm.png b/extras/assets/icons/png/Icon_Actions/disarm.png new file mode 100644 index 00000000000..1bf8de15480 Binary files /dev/null and b/extras/assets/icons/png/Icon_Actions/disarm.png differ diff --git a/extras/assets/icons/png/Icon_Module_Ambient_Sounds_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Ambient_Sounds_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Ambient_Sounds_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Ambient_Sounds_ca.png diff --git a/extras/assets/icons/png/Icon_Module_BFTracking_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_BFTracking_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_BFTracking_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_BFTracking_ca.png diff --git a/extras/assets/icons/png/Icon_Module_CheckPBO_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_CheckPBO_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_CheckPBO_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_CheckPBO_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Explosives_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Explosives_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Explosives_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Explosives_ca.png diff --git a/extras/assets/icons/png/Icon_Module_FriendlyFire_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_FriendlyFire_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_FriendlyFire_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_FriendlyFire_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Hearing_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Hearing_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Hearing_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Hearing_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Interaction_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Interaction_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Interaction_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Interaction_ca.png diff --git a/extras/assets/icons/png/Icon_Module_LSD_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_LSD_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_LSD_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_LSD_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Make_Unit_Surrender_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Make_Unit_Surrender_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Make_Unit_Surrender_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Make_Unit_Surrender_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Map_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Map_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Map_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Map_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Medical_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Medical_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Medical_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Medical_ca.png diff --git a/extras/assets/icons/png/Icon_Module_NameTags_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_NameTags_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_NameTags_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_NameTags_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Rallypoint_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Rallypoint_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Rallypoint_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Rallypoint_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Respawn_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Respawn_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Respawn_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Respawn_ca.png diff --git a/extras/assets/icons/png/Icon_Module_SwitchUnits_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_SwitchUnits_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_SwitchUnits_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_SwitchUnits_ca.png diff --git a/extras/assets/icons/png/Icon_Module_VehicleKey_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_VehicleKey_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_VehicleKey_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_VehicleKey_ca.png diff --git a/extras/assets/icons/png/Icon_Module_VehicleLock_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_VehicleLock_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_VehicleLock_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_VehicleLock_ca.png diff --git a/extras/assets/icons/png/Icon_Module_Wind_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_Wind_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_Wind_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_Wind_ca.png diff --git a/extras/assets/icons/png/Icon_Module_microDAGR_ca.png b/extras/assets/icons/png/Icon_Module/Icon_Module_microDAGR_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_microDAGR_ca.png rename to extras/assets/icons/png/Icon_Module/Icon_Module_microDAGR_ca.png diff --git a/extras/manual_Horus_ATrag-v385.pdf b/extras/manual_Horus_ATrag-v385.pdf new file mode 100644 index 00000000000..e3b4a0555d3 Binary files /dev/null and b/extras/manual_Horus_ATrag-v385.pdf differ diff --git a/tools/build.py b/tools/build.py index 2b792f77dc9..c6a425975e8 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__": diff --git a/tools/make.py b/tools/make.py index cdd2de22ed6..bd27f893f5d 100644 --- a/tools/make.py +++ b/tools/make.py @@ -535,6 +535,10 @@ def main(argv): else: old_sha = "" + #We always build ACE_common so we can properly show the correct version stamp in the RPT file. + if module == "common": + old_sha = "" + # Hash the module new_sha = get_directory_hash(os.path.join(module_root, module)) @@ -606,14 +610,17 @@ def main(argv): cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-bin", "-dst", os.path.join(work_drive, prefix, module, "config.bin"), os.path.join(work_drive, prefix, module, "config.cpp")] ret = subprocess.call(cmd) if ret != 0: - print_error("CfgConvert -bin return code == " + str(ret)) - input("Press Enter to continue...") + print_error("CfgConvert -bin return code == " + str(ret) + ". Usually means there is a syntax error within the config.cpp file.") + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-txt", "-dst", os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.bin")] ret = subprocess.call(cmd) if ret != 0: - print_error("CfgConvert -txt) return code == " + str(ret)) - input("Press Enter to continue...") + print_error("CfgConvert -txt return code == " + str(ret) + ". Usually means there is a syntax error within the config.cpp file.") + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) + # Include build number try: @@ -622,13 +629,16 @@ def main(argv): configtext = f.read() f.close() - patchestext = re.search(r"class CfgPatches\n\{(.*?)\n\}", configtext, re.DOTALL).group(1) - patchestext = re.sub(r'version(.*?)="(.*?)"', r'version\1="\2-{}"'.format(commit_id), patchestext) - configtext = re.sub(r"class CfgPatches\n\{(.*?)\n\}", "class CfgPatches\n{"+patchestext+"\n}", configtext, flags=re.DOTALL) - - f = open(configpath, "w") - f.write(configtext) - f.close() + if configtext: + patchestext = re.search(r"class CfgPatches\n\{(.*?)\n\}", configtext, re.DOTALL).group(1) + patchestext = re.sub(r'version(.*?)="(.*?)"', r'version\1="\2-{}"'.format(commit_id), patchestext) + configtext = re.sub(r"class CfgPatches\n\{(.*?)\n\}", "class CfgPatches\n{"+patchestext+"\n}", configtext, flags=re.DOTALL) + f = open(configpath, "w") + f.write(configtext) + f.close() + else: + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) except: raise print_error("Failed to include build number") @@ -675,7 +685,6 @@ def main(argv): if not build_successful: print_error("pboProject return code == " + str(ret)) print_error("Module not successfully built/signed.") - input("Press Enter to continue...") print ("Resuming build...") continue diff --git a/tools/make64.py b/tools/make64.py index 61dee963101..b6635f884e9 100644 --- a/tools/make64.py +++ b/tools/make64.py @@ -535,6 +535,10 @@ def main(argv): else: old_sha = "" + #We always build ACE_common so we can properly show the correct version stamp in the RPT file. + if module == "common": + old_sha = "" + # Hash the module new_sha = get_directory_hash(os.path.join(module_root, module)) @@ -606,14 +610,17 @@ def main(argv): cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-bin", "-dst", os.path.join(work_drive, prefix, module, "config.bin"), os.path.join(work_drive, prefix, module, "config.cpp")] ret = subprocess.call(cmd) if ret != 0: - print_error("CfgConvert -bin return code == " + str(ret)) - input("Press Enter to continue...") + print_error("CfgConvert -bin return code == " + str(ret) + ". Usually means there is a syntax error within the config.cpp file.") + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) cmd = [os.path.join(arma3tools_path, "CfgConvert", "CfgConvert.exe"), "-txt", "-dst", os.path.join(work_drive, prefix, module, "config.cpp"), os.path.join(work_drive, prefix, module, "config.bin")] ret = subprocess.call(cmd) if ret != 0: - print_error("CfgConvert -txt) return code == " + str(ret)) - input("Press Enter to continue...") + print_error("CfgConvert -txt return code == " + str(ret) + ". Usually means there is a syntax error within the config.cpp file.") + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) + # Include build number try: @@ -622,13 +629,16 @@ def main(argv): configtext = f.read() f.close() - patchestext = re.search(r"class CfgPatches\n\{(.*?)\n\}", configtext, re.DOTALL).group(1) - patchestext = re.sub(r'version(.*?)="(.*?)"', r'version\1="\2-{}"'.format(commit_id), patchestext) - configtext = re.sub(r"class CfgPatches\n\{(.*?)\n\}", "class CfgPatches\n{"+patchestext+"\n}", configtext, flags=re.DOTALL) - - f = open(configpath, "w") - f.write(configtext) - f.close() + if configtext: + patchestext = re.search(r"class CfgPatches\n\{(.*?)\n\}", configtext, re.DOTALL).group(1) + patchestext = re.sub(r'version(.*?)="(.*?)"', r'version\1="\2-{}"'.format(commit_id), patchestext) + configtext = re.sub(r"class CfgPatches\n\{(.*?)\n\}", "class CfgPatches\n{"+patchestext+"\n}", configtext, flags=re.DOTALL) + f = open(configpath, "w") + f.write(configtext) + f.close() + else: + os.remove(os.path.join(work_drive, prefix, module, "config.cpp")) + os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp")) except: raise print_error("Failed to include build number") @@ -675,7 +685,6 @@ def main(argv): if not build_successful: print_error("pboProject return code == " + str(ret)) print_error("Module not successfully built/signed.") - input("Press Enter to continue...") print ("Resuming build...") continue diff --git a/tools/stringtableduplicates.py b/tools/stringtableduplicates.py index 16b27638539..b9b49200591 100755 --- a/tools/stringtableduplicates.py +++ b/tools/stringtableduplicates.py @@ -2,55 +2,59 @@ import os import sys + +import xml.dom from xml.dom import minidom -# STRINGTABLE DUPLICATE FINDER +# STRINGTABLE DIAG TOOL # Author: KoffeinFlummi -# ---------------------------- -# Counts duplicate stringtable entries +# --------------------- +# Counts duplicates stringtable entries + + +def check_module(projectpath, module): + """ Checks the given module for all the different languages. """ + localized = [] + + stringtablepath = os.path.join(projectpath, module, "stringtable.xml") + try: + xmldoc = minidom.parse(stringtablepath) + except IOError: + return 0 + keys = xmldoc.getElementsByTagName("Key") + + duplicates = 0 + for key in keys: + children = key.childNodes + entries = [] + for c in range(children.length): + entries.append(children.item(c)) + entries = list(filter(lambda x: x.nodeType == x.ELEMENT_NODE, entries)) + entries = list(map(lambda x: str(x.nodeName).lower(), entries)) + diff = len(entries) - len(list(set(entries))) + duplicates += diff + if diff > 0: + print key.getAttribute("ID") + + return duplicates def main(): scriptpath = os.path.realpath(__file__) projectpath = os.path.dirname(os.path.dirname(scriptpath)) projectpath = os.path.join(projectpath, "addons") - entries = {} + print("###############################") + print("# Stringtable Duplicates Tool #") + print("###############################\n") + duplicates = 0 for module in os.listdir(projectpath): - if module[0] == ".": - continue - stringtablepath = os.path.join(projectpath, module, "stringtable.xml") - try: - xmldoc = minidom.parse(stringtablepath) - except: - continue - - keys = xmldoc.getElementsByTagName("English") - for key in keys: - text = key.firstChild.wholeText - parentid = key.parentNode.getAttribute("ID") - if text in entries: - entries[text].append(parentid) - else: - entries[text] = [parentid] - - entries = {k: v for k, v in entries.items() if len(v) > 1} - output = list([[k, v] for k, v in entries.items()]) - output = sorted(output, key=lambda x: len(x[1])*-1) - - print("Potential duplicate stringtable entries:\n") - for l in output: - k, v = l - print(k.ljust(50), end=" ") - print("Listed %i times in: %s" % (len(v), ", ".join(v))) - - print("\n# MARKDOWN\n") - - print("| Text | # Occurences | Containing Entries |") - print("|------|-------------:|--------------------|") - - for l in output: - print("| %s | %i | %s |" % (l[0], len(l[1]), ", ".join(l[1]))) + d = check_module(projectpath, module) + + print("# {} {}".format(module.ljust(20), d)) + duplicates += d + + print("\nTotal number of duplicates: {}".format(duplicates)) if __name__ == "__main__": main()