diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf index b58a2b88e8..1d19a9c492 100644 --- a/addons/advanced_ballistics/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(calculateAirDensity); PREP(calculateAmmoTemperatureVelocityShift); PREP(calculateAtmosphericCorrection); PREP(calculateBarrelLengthVelocityShift); diff --git a/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf b/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf index ea7a77e837..298049e51d 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAirDensity.sqf @@ -1,7 +1,7 @@ /* * Author: Ruthberg * - * Displays a wind info (colored arrow) in the top left corner of the screen + * Calculates the air density * * Arguments: * 0: temperature - degrees celcius diff --git a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf index 02e849399e..b0166109f5 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf @@ -24,7 +24,7 @@ _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); +_airDensity = [_temperature, _pressure, _relativeHumidity] call EFUNC(weather,calculateAirDensity); if (_atmosphereModel == "ICAO") then { (STD_AIR_DENSITY_ICAO / _airDensity) * _ballisticCoefficient diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index baa3a871fa..54a7f2d5b0 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -110,7 +110,7 @@ _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; + _barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure); _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); }; @@ -288,7 +288,7 @@ if (GVAR(AdvancedAirDragEnabled)) then { }; if (GVAR(AtmosphericDensitySimulationEnabled)) then { - _pressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 10 * overcast; + _pressure = (_bulletPosition select 2) call EFUNC(weather,calculateBarometricPressure); _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2); _humidity = EGVAR(weather,currentHumidity); _airDensity = STD_AIR_DENSITY_ICAO; @@ -315,7 +315,7 @@ if (GVAR(AdvancedAirDragEnabled)) then { _bulletVelocity = _bulletVelocity vectorDiff _accel; } else { if (GVAR(AtmosphericDensitySimulationEnabled)) then { - _pressureDeviation = 1013.25 * exp(-(EGVAR(weather,Altitude) + (_bulletPosition select 2)) / 7990) - 1013.25 - 10 * overcast; + _pressureDeviation = (_bulletPosition select 2) call EFUNC(weather,calculateBarometricPressure) - 1013.25; _temperature = GET_TEMPERATURE_AT_HEIGHT(_bulletPosition select 2); _humidity = EGVAR(weather,currentHumidity); _airFriction = _airFriction + ((_temperature - 15) * 0.0000015 + _humidity * 0.0000040 + _pressureDeviation * -0.0000009); diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index 905212d5c9..fe45ef67f5 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -1115,6 +1115,13 @@ class ATragMX_Display { idc=120060; y=0.265*safezoneH+safezoneY+0.520; }; + class TEXT_GUN_AMMO_DATA_ZERO_RANGE_METER_INDICATOR: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { + idc=120061; + w=0.05; + x=0.550*safezoneW+safezoneX+0.315; + y=0.265*safezoneH+safezoneY+0.520; + text=""; + }; class TEXT_GUN_AMMO_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=12008; action=QUOTE(1 call FUNC(toggle_gun_ammo_data)); @@ -1327,6 +1334,13 @@ class ATragMX_Display { idc=140060; y=0.265*safezoneH+safezoneY+0.520; }; + class TEXT_TARGET_DATA_TARGET_RANGE_METER_INDICATOR: TEXT_TARGET_DATA_LATITUDE { + idc=140061; + w=0.05; + x=0.550*safezoneW+safezoneX+0.315; + y=0.265*safezoneH+safezoneY+0.520; + text=""; + }; class TEXT_TARGET_DATA_DONE: TEXT_TARGET_SPEED_ASSIST_DONE { idc=14008; action=QUOTE(1 call FUNC(toggle_target_data)); diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf index 574b5a8991..7f047834e2 100644 --- a/addons/atragmx/XEH_postInit.sqf +++ b/addons/atragmx/XEH_postInit.sqf @@ -6,16 +6,16 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == GVAR(gunList) = profileNamespace getVariable "ACE_ATragMX_gunList"; } else { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model - GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0659, -0.0008600, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ], + GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657, -0.0006400, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ], - ["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0008600, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ], - ["12.7x99mm" , 853, 100, 0.0623, -0.0008600, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ], + ["12.7x99mm AMAX" , 860, 100, 0.0612, -0.0003740, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ], + ["12.7x99mm" , 853, 100, 0.0623, -0.0006000, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ], - ["12.7x54mm" , 300, 100, 0.3394, -0.0014000, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ], + ["12.7x54mm" , 300, 100, 0.3395, -0.0001400, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ], - [".408 Chey Tac" , 910, 100, 0.0569, -0.0004800, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ], + [".408 Chey Tac" , 910, 100, 0.0571, -0.0003950, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ], - ["9.3×64mm" , 870, 100, 0.0619, -0.0007500, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ], + ["9.3×64mm" , 870, 100, 0.0619, -0.0010600, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ], [".338LM 250gr" , 880, 100, 0.0598, -0.0006060, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"], [".338LM 300gr" , 800, 100, 0.0677, -0.0005350, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"], diff --git a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf index 06ab20b3b7..dfab6da238 100644 --- a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf @@ -17,7 +17,7 @@ GVAR(showGunAmmoData) = _this; -{ctrlShow [_x, _this]} forEach [12000, 120000, 12001, 120010, 12002, 120020, 12003, 120030, 12004, 120040, 12005, 120050, 12006, 120060, 12007, 12008, 12009, 12010, 12011]; +{ctrlShow [_x, _this]} forEach [12000, 120000, 12001, 120010, 12002, 120020, 12003, 120030, 12004, 120040, 12005, 120050, 12006, 120060, 120061, 12007, 12008, 12009, 12010, 12011]; if (_this) then { [] call FUNC(update_gun_ammo_data); diff --git a/addons/atragmx/functions/fnc_show_target_data.sqf b/addons/atragmx/functions/fnc_show_target_data.sqf index 4e696ae331..48e419f65f 100644 --- a/addons/atragmx/functions/fnc_show_target_data.sqf +++ b/addons/atragmx/functions/fnc_show_target_data.sqf @@ -17,7 +17,7 @@ GVAR(showTargetData) = _this; -{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 14006, 140060, 14007, 14008, 14009, 14010, 14011]; +{ctrlShow [_x, _this]} forEach [14000, 140000, 14001, 140010, 14002, 141020, 140020, 141021, 140021, 14003, 140030, 14004, 140040, 141040, 141041, 140041, 14005, 140050, 14006, 140060, 140061, 14007, 14008, 14009, 14010, 14011]; if (_this) then { [] call FUNC(update_target_data); diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 3627197185..4ccae287e7 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -47,10 +47,15 @@ if (GVAR(currentUnit) != 2) then { } else { ctrlSetText [120050, Str(Round(GVAR(workingMemory) select 1))]; }; -if (GVAR(currentUnit) == 2) then { - ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))]; -} else { +if (GVAR(currentUnit) == 1) then { ctrlSetText [120060, Str(Round((GVAR(workingMemory) select 2) * 1.0936133))]; +} else { + ctrlSetText [120060, Str(Round(GVAR(workingMemory) select 2))]; +}; +if (GVAR(currentUnit) == 0) then { + ctrlSetText [120061, "*"]; +} else { + ctrlSetText [120061, ""]; }; if (GVAR(currentUnit) == 2) then { diff --git a/addons/atragmx/functions/fnc_update_target_data.sqf b/addons/atragmx/functions/fnc_update_target_data.sqf index 733118d583..b5e6dcf85a 100644 --- a/addons/atragmx/functions/fnc_update_target_data.sqf +++ b/addons/atragmx/functions/fnc_update_target_data.sqf @@ -37,6 +37,11 @@ if (GVAR(currentUnit) == 1) then { } else { ctrlSetText [140060, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; }; +if (GVAR(currentUnit) == 0) then { + ctrlSetText [140061, "*"]; +} else { + ctrlSetText [140061, ""]; +}; if (GVAR(currentUnit) == 2) then { ctrlSetText [14002, "Wind Speed (m/s)"]; diff --git a/addons/atragmx/script_component.hpp b/addons/atragmx/script_component.hpp index 7cd5b44911..6e81f79493 100644 --- a/addons/atragmx/script_component.hpp +++ b/addons/atragmx/script_component.hpp @@ -11,4 +11,4 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.1 +#define ATRAGMX_PROFILE_NAMESPACE_VERSION 1.2 diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 33eb0d9cac..70ed9666b4 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -183,7 +183,7 @@ %1<br/>Attached %1<br/>befestigt %1<br/>acoplada - %1<br/>Przyczepiono + %1<br/>przyczepiono %1<br/>attachée %1<br/>Připnutý %1<br/>Acoplada @@ -195,7 +195,7 @@ %1<br/>Detached %1<br/>entfernt %1<br/>quitada - %1<br/>Odczepiono + %1<br/>odczepiono %1<br/>détachée %1<br/>Odepnutý %1<br/>Separada diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 0a88c5d7d8..55a9f6211a 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -6,7 +6,7 @@ Gefangen nehmen Tomar prisionero Capturer le prisonnier - Weź więźnia + Aresztuj Zajmout Osobu Arresta il Prigioniero Tomar Prisioneiro @@ -53,7 +53,7 @@ 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! + Najpierw musisz go aresztować! Vous devez d'abord le capturer! Musíš ho nejdříve zajmout! Prima devi arrestarlo! @@ -188,4 +188,4 @@ Niente selezionato - \ No newline at end of file + diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index b02979e279..521ab87006 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -29,7 +29,7 @@ Item too heavy Gegenstand ist zu schwer Articulo demasiado pesado - Przedmiot zbyt ciężki + Przedmiot jest 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 diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 6898274307..8e941b1f2a 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -233,7 +233,7 @@ Dial Wählen Marcar - Wybierz mumer + Wybierz numer Composer Vytočit Composizione numero @@ -281,7 +281,7 @@ Detonate Menu "Zünden"-Menü Menú de detonación - Menu detonowania + Menu detonacji Menu de mise à feu Menu Detonace Menù di detonazione @@ -484,7 +484,7 @@ 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. + 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. Используется для дистанционного подрыва, после смерти оператора. diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 9064e5c2d0..38902f80cf 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -430,7 +430,7 @@ 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 + Zostałeś klepnięty w prawe ramię Megveregették a JOBB válladat. Někdo tě poklepal na PRAVÉ rameno Вас похлопали по ПРАВОМУ плечу @@ -442,7 +442,7 @@ 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 + Zostałeś klepnięty w lewe ramię Megveregették a BAL válladat. Někdo tě poklepal na LEVÉ rameno Вас похлопали по ЛЕВОМУ плечу diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index 8ebd4e01d2..bbad8619bc 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -19,7 +19,7 @@ private ["_playerDir", "_windSpeed", "_windDir", "_crosswind", "_headwind", "_hu 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; + _barometricPressure = ((getPosASL ACE_player) select 2) call EFUNC(weather,calculateBarometricPressure); _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]; @@ -82,7 +82,7 @@ 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; +_barometricPressure = ((getPosASL ACE_player) select 2) call EFUNC(weather,calculateBarometricPressure); 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]; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 3e392bd55b..3f5e77b748 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -174,7 +174,7 @@ switch (GVAR(Menu)) do { }; 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); + _textCenterBig = Str(round((((getPosASL ACE_player) select 2) call EFUNC(weather,calculateBarometricPressure)) * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 9645aa2289..e85283c471 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -477,7 +477,7 @@ Minor Gering Menor - Легкие ранения + Несрочная помощь Normalny Léger Minimální @@ -487,7 +487,7 @@ Delayed Retrasado - Средние ранения + Срочная помощь Opóźniony Différé Verzögert @@ -498,7 +498,7 @@ Immediate Inmediato - Тяжелые ранения + Неотложная помощь Natychmiastowy Urgence Immédiate Sofort @@ -1529,7 +1529,7 @@ Heavily wounded Schwer verwundet: Ciężko ranny - Сильные ранения + Тяжелые ранения Gravemente ferito Gravemente herido Lourdement blessé @@ -1610,7 +1610,7 @@ Pain Effect Type Schmerzeffekt-Typ Rodzaj efektu bólu - Эффект боли + Визуальный эффект боли Pain Effect Type Tipo de efecto de dolor Type d'effet de douleur diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index f98c7f438c..91d83646b4 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -1,5 +1,4 @@  - @@ -252,7 +251,7 @@ Mostrar MicroDAGR Показать MicroDAGR Ukázat MicroDAGR GPS - Pokaż<br />MicroDAGR + Pokaż MicroDAGR Afficher MicroDAGR MicroDAGR mutatása Mostra MicroDAGR @@ -263,7 +262,7 @@ Configurar MicroDAGR Настроить MicroDAGR Konfigurovat MicroDAGR GPS - Konfiguruj<br />MicroDAGR + Konfiguruj MicroDAGR Configurer MicroDAGR MicroDAGR konfigurálása ConfiguraMicroDAGR @@ -274,7 +273,7 @@ Cerrar MicroDAGR Закрыть MicroDAGR Zavřít MicroDAGR GPS - Zamknij<br />MicroDAGR + Zamknij MicroDAGR Fermer MicroDAGR MicroDAGR elrejtése Chiudi MicroDAGR diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 77e10b6ee9..e224ce61e4 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -22,7 +22,7 @@ Zobrazit jména hráčů Mostrar nomes de jogadores Mostra i nomi dei giocatori - Показать имена игроков + Показывать имена игроков (включить имена) Show player name only on cursor (requires player names) @@ -34,7 +34,7 @@ Mostra i nomi solo se puntati (richiede mostra nomi abilitato) 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) @@ -44,7 +44,7 @@ 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) - Показать имена игроков только по нажатию клавиши (требует имен игроков) + Показать имена игроков только по нажатию клавиши (при включенных именах) Mostra i nomi solo se si preme il tasto (richiede mostra nomi abilitato) @@ -57,7 +57,7 @@ Mostra i gradi (richiede mostra nomi abilitato) 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 @@ -74,7 +74,7 @@ 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 @@ -85,7 +85,7 @@ 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) diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 9276e710da..e40a061aaf 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -1,6 +1,36 @@ -//XEH_postInit.sqf -//#define DEBUG_MODE_FULL #include "script_component.hpp" + +// Rain variables +GVAR(enableRain) = true; +GVAR(rain_next_period) = -1; +GVAR(rain_period_count) = 0; +GVAR(rain_initial_rain) = 0; +if(overcast >= 0.7) then { + GVAR(rain_initial_rain) = (random ((overcast-0.7)/0.3)); +}; +GVAR(current_rain) = GVAR(rain_initial_rain); +GVAR(rain_current_range) = -1+(random 2); +GVAR(overcast_multiplier) = 1; + +// Wind Variables +ACE_wind = [0, 0, 0]; +GVAR(wind_initial_dir) = (random 360); +GVAR(wind_initial_speed) = (overcast*5)+(random (overcast*5)) max 1; +GVAR(wind_mean_speed) = GVAR(wind_initial_speed); +GVAR(wind_mean_dir) = GVAR(wind_initial_dir); +GVAR(wind_current_speed) = GVAR(wind_initial_speed); +GVAR(wind_current_dir) = GVAR(wind_initial_dir); +GVAR(wind_current_range_speed) = -1+(random 2); +GVAR(wind_current_range_dir) = -1+(random 2); +GVAR(wind_next_period) = -1; //ceil((2+random(5))/(GVAR(overcast_multiplier)/10)); +GVAR(wind_next_major_period) = -1; +GVAR(wind_period_count) = 0; +GVAR(wind_major_period_count) = 0; +GVAR(wind_total_time) = 0; +GVAR(wind_period_start_time) = time; + +call FUNC(getMapData); + "ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = time; }; "ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = time; }; "ACE_MISC_PARAMS" addPublicVariableEventHandler { @@ -22,66 +52,9 @@ {false}, [37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) -// Update Wind simulWeatherSync; -_fnc_updateWind = { - ACE_wind = [] call FUNC(getWind); - setWind [ACE_wind select 0, ACE_wind select 1, true]; - 2 setGusts 0; - // Set waves: 0 when no wind, 1 when wind >= 16 m/s - 1 setWaves (((vectorMagnitude ACE_wind) / 16.0) min 1.0); - - //systemChat format ["w:%1 %2,ACE_w:%1 %2, w", [wind select 0, wind select 1, ACE_wind select 0, ACE_wind select 1]]; -}; -[_fnc_updateWind, 1, []] call CBA_fnc_addPerFrameHandler; - - -// Update Rain -_fnc_updateRain = { - private ["_oldStrength","_rainStrength","_transitionTime","_periodPosition","_periodPercent"]; - if(GVAR(enableRain)) then { - if(!isNil "ACE_RAIN_PARAMS" && {!isNil QGVAR(rain_period_start_time)}) then { - _oldStrength = ACE_RAIN_PARAMS select 0; - _rainStrength = ACE_RAIN_PARAMS select 1; - _transitionTime = ACE_RAIN_PARAMS select 2; - _periodPosition = (time - GVAR(rain_period_start_time)) min _transitionTime; - _periodPercent = (_periodPosition/_transitionTime) min 1; - - 0 setRain ((_periodPercent*(_rainStrength-_oldStrength))+_oldStrength); - }; - }; -}; -[_fnc_updateRain, 2, []] call CBA_fnc_addPerFrameHandler; - - -// Update Temperature -_fnc_updateTemperature = { - private ["_time","_month","_hourlyCoef","_avgTemperature","_pS1","_pS2"]; - _time = daytime; - _month = date select 1; - - // Temperature - _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) - 2 * humidity - 4 * overcast; - GVAR(currentTemperature) = round(GVAR(currentTemperature) * 10) / 10; - - // Humidity - GVAR(currentHumidity) = (GVAR(Humidity) select _month) / 100; - - if (rain > 0 && overcast > 0.7) then { - GVAR(currentHumidity) = 1; - } else { - _avgTemperature = ((GVAR(TempDay) select (_month - 1)) + (GVAR(TempNight) select (_month - 1))) / 2; - _pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature)); - _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); - GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2; - }; - GVAR(currentHumidity) = 0 max GVAR(currentHumidity) min 1; - - // @todo: take altitude and humidity into account - GVAR(currentRelativeDensity) = (273.15 + 20) / (273.15 + GVAR(currentTemperature)); -}; -[_fnc_updateTemperature, 20, []] call CBA_fnc_addPerFrameHandler; +[FUNC(updateTemperature), 20, []] call CBA_fnc_addPerFrameHandler; +[FUNC(updateHumidity), 20, []] call CBA_fnc_addPerFrameHandler; +[FUNC(updateWind), 1, []] call CBA_fnc_addPerFrameHandler; +[FUNC(updateRain), 2, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf index 2751e77226..ee05983a69 100644 --- a/addons/weather/XEH_preInit.sqf +++ b/addons/weather/XEH_preInit.sqf @@ -2,44 +2,16 @@ #include "script_component.hpp" ADDON = false; -LOG(MSG_INIT); +PREP(calculateAirDensity); +PREP(calculateBarometricPressure); PREP(displayWindInfo); PREP(getMapData); PREP(getWind); PREP(serverController); - - -// Rain variables -GVAR(enableRain) = true; -GVAR(rain_next_period) = -1; -GVAR(rain_period_count) = 0; -GVAR(rain_initial_rain) = 0; -if(overcast >= 0.7) then { - GVAR(rain_initial_rain) = (random ((overcast-0.7)/0.3)); -}; -GVAR(current_rain) = GVAR(rain_initial_rain); -GVAR(rain_current_range) = -1+(random 2); -GVAR(overcast_multiplier) = 1; - -// Wind Variables -ACE_wind = [0, 0, 0]; -GVAR(wind_initial_dir) = (random 360); -GVAR(wind_initial_speed) = (overcast*5)+(random (overcast*5)) max 1; -GVAR(wind_mean_speed) = GVAR(wind_initial_speed); -GVAR(wind_mean_dir) = GVAR(wind_initial_dir); -GVAR(wind_current_speed) = GVAR(wind_initial_speed); -GVAR(wind_current_dir) = GVAR(wind_initial_dir); -GVAR(wind_current_range_speed) = -1+(random 2); -GVAR(wind_current_range_dir) = -1+(random 2); -GVAR(wind_next_period) = -1; //ceil((2+random(5))/(GVAR(overcast_multiplier)/10)); -GVAR(wind_next_major_period) = -1; -GVAR(wind_period_count) = 0; -GVAR(wind_major_period_count) = 0; -GVAR(wind_total_time) = 0; -GVAR(wind_period_start_time) = time; - -// Init weather variables, in case they are needed before postInit -call FUNC(getMapData); +PREP(updateHumidity); +PREP(updateRain); +PREP(updateTemperature); +PREP(updateWind); ADDON = true; diff --git a/addons/weather/functions/fnc_calculateAirDensity.sqf b/addons/weather/functions/fnc_calculateAirDensity.sqf new file mode 100644 index 0000000000..298049e51d --- /dev/null +++ b/addons/weather/functions/fnc_calculateAirDensity.sqf @@ -0,0 +1,36 @@ +/* + * Author: Ruthberg + * + * Calculates the air density + * + * 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/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf new file mode 100644 index 0000000000..c65d343c93 --- /dev/null +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -0,0 +1,20 @@ +/* + * Author: Ruthberg + * + * Calculates the barometric pressure based on altitude and weather + * + * Arguments: + * 0: altitude - meters + * + * Return Value: + * 0: barometric pressure - hPA + * + * Return value: + * None + */ +#include "script_component.hpp" + +private ["_altitude"]; +_altitude = _this; + +(1013.25 * exp(-(GVAR(Altitude) + _altitude) / 7990) - 10 * overcast) diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index d84cddd106..58d728bf67 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -1,5 +1,6 @@ /* * Author: Ruthberg + * * Displays a wind info (colored arrow) in the top left corner of the screen * * Argument: diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index fecf9f34f7..cb0a961c21 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -1,5 +1,6 @@ /* * Author: Ruthberg, esteldunedain + * * Get the weather data for the current map * * Argument: @@ -109,3 +110,6 @@ if (worldName in ["Imrali"]) exitWith { GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; + +GVAR(currentTemperature) = 20; +GVAR(currentHumidity) = 0.5; diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf index b0fbf5e8fa..54ec6efad3 100644 --- a/addons/weather/functions/fnc_getWind.sqf +++ b/addons/weather/functions/fnc_getWind.sqf @@ -1,5 +1,6 @@ /* * Author: ACE2 Team + * * Calculate current wind locally from the data broadcasted by the server * * Argument: diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf index e29836fc18..d7dff0eb70 100644 --- a/addons/weather/functions/fnc_serverController.sqf +++ b/addons/weather/functions/fnc_serverController.sqf @@ -1,5 +1,6 @@ /* * Author: ACE2 Team, esteldunedain + * * Calculate the wind and rain evolution on the server. Broadcast the current and next values to the clients * * Argument: diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf new file mode 100644 index 0000000000..e3ba7a0224 --- /dev/null +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -0,0 +1,28 @@ +/* + * Author: ACE2 Team + * + * Updates GVAR(currentHumidity) based on + * + * Argument: + * Nothing + * + * Return value: + * Nothing + */ +#include "script_component.hpp" + +private ["_month", "_avgTemperature", "_pS1", "_pS2"]; +_month = date select 1; + +GVAR(currentHumidity) = (GVAR(Humidity) select _month) / 100; + +if (rain > 0 && overcast > 0.7) then { + GVAR(currentHumidity) = 1; +} else { + _avgTemperature = ((GVAR(TempDay) select (_month - 1)) + (GVAR(TempNight) select (_month - 1))) / 2; + _pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature)); + _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); + GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2; +}; + +GVAR(currentHumidity) = 0 max GVAR(currentHumidity) min 1; diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf new file mode 100644 index 0000000000..01e32e1734 --- /dev/null +++ b/addons/weather/functions/fnc_updateRain.sqf @@ -0,0 +1,26 @@ +/* + * Author: ACE2 Team + * + * Updates rain based on ACE_RAIN_PARAMS + * + * Argument: + * Nothing + * + * Return value: + * Nothing + */ +#include "script_component.hpp" + +private ["_oldStrength", "_rainStrength", "_transitionTime", "_periodPosition", "_periodPercent"]; + +if (!GVAR(enableRain)) exitWith {}; + +if (!isNil "ACE_RAIN_PARAMS" && {!isNil QGVAR(rain_period_start_time)}) then { + _oldStrength = ACE_RAIN_PARAMS select 0; + _rainStrength = ACE_RAIN_PARAMS select 1; + _transitionTime = ACE_RAIN_PARAMS select 2; + _periodPosition = (time - GVAR(rain_period_start_time)) min _transitionTime; + _periodPercent = (_periodPosition/_transitionTime) min 1; + + 0 setRain ((_periodPercent*(_rainStrength-_oldStrength))+_oldStrength); +}; diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf new file mode 100644 index 0000000000..5e342ad83d --- /dev/null +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -0,0 +1,22 @@ +/* + * Author: ACE2 Team + * + * Updates GVAR(currentTemperature) based on the map data + * + * Argument: + * Nothing + * + * Return value: + * Nothing + */ +#include "script_component.hpp" + +private ["_time", "_month", "_hourlyCoef"]; +_time = daytime; +_month = date select 1; + +_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) - 2 * humidity - 4 * overcast; +GVAR(currentTemperature) = round(GVAR(currentTemperature) * 10) / 10; diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf new file mode 100644 index 0000000000..e5a52348a8 --- /dev/null +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -0,0 +1,21 @@ +/* + * Author: ACE2 Team + * + * Updates wind, gusts and waves based on ACE_wind + * + * Argument: + * Nothing + * + * Return value: + * Nothing + */ +#include "script_component.hpp" + +ACE_wind = [] call FUNC(getWind); +setWind [ACE_wind select 0, ACE_wind select 1, true]; +2 setGusts 0; + +// Set waves: 0 when no wind, 1 when wind >= 16 m/s +1 setWaves (((vectorMagnitude ACE_wind) / 16.0) min 1.0); + +//hintSilent format["Wind: %1\nACE_wind: %2\nDeviation: %3 (m/s)", wind, ACE_wind, Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000]; diff --git a/addons/weather/script_component.hpp b/addons/weather/script_component.hpp index a21d8245fd..edc1ac64d0 100644 --- a/addons/weather/script_component.hpp +++ b/addons/weather/script_component.hpp @@ -10,3 +10,11 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + +#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