From cca61e95f8c8d8807ad874ea13319f712e288d0f Mon Sep 17 00:00:00 2001 From: jaynus Date: Tue, 13 Jan 2015 08:26:45 -0800 Subject: [PATCH] initial commit. --- addons/wind_deflection/$PBOPREFIX$ | 1 + addons/wind_deflection/CfgEventhandlers.hpp | 19 ++++ addons/wind_deflection/RscTitles.hpp | 35 ++++++++ addons/wind_deflection/XEH_postInit.sqf | 33 +++++++ addons/wind_deflection/XEH_postServerInit.sqf | 3 + addons/wind_deflection/XEH_preClientInit.sqf | 34 ++++++++ addons/wind_deflection/XEH_preInit.sqf | 55 ++++++++++++ addons/wind_deflection/cfgAmmo.hpp | 45 ++++++++++ addons/wind_deflection/config.cpp | 28 ++++++ .../data/icon/icon_ace_wind_ca.paa | Bin 0 -> 1522 bytes addons/wind_deflection/data/wind0.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind1.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind10.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind11.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind12.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind2.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind3.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind4.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind5.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind6.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind7.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind8.paa | Bin 0 -> 22016 bytes addons/wind_deflection/data/wind9.paa | Bin 0 -> 22016 bytes .../functions/fnc_bulletflight.sqf | 31 +++++++ .../functions/fnc_clockwind.sqf | 26 ++++++ .../functions/fnc_fired_driftchart.sqf | 43 +++++++++ .../functions/fnc_fired_man.sqf | 14 +++ .../wind_deflection/functions/fnc_getWind.sqf | 20 +++++ .../functions/fnc_keypressed.sqf | 35 ++++++++ .../functions/fnc_serverController.sqf | 82 ++++++++++++++++++ .../functions/fnc_wind_intuitive.sqf | 30 +++++++ .../functions/script_component.hpp | 1 + addons/wind_deflection/script_component.hpp | 12 +++ addons/wind_deflection/stringtable.xml | 18 ++++ 34 files changed, 565 insertions(+) create mode 100644 addons/wind_deflection/$PBOPREFIX$ create mode 100644 addons/wind_deflection/CfgEventhandlers.hpp create mode 100644 addons/wind_deflection/RscTitles.hpp create mode 100644 addons/wind_deflection/XEH_postInit.sqf create mode 100644 addons/wind_deflection/XEH_postServerInit.sqf create mode 100644 addons/wind_deflection/XEH_preClientInit.sqf create mode 100644 addons/wind_deflection/XEH_preInit.sqf create mode 100644 addons/wind_deflection/cfgAmmo.hpp create mode 100644 addons/wind_deflection/config.cpp create mode 100644 addons/wind_deflection/data/icon/icon_ace_wind_ca.paa create mode 100644 addons/wind_deflection/data/wind0.paa create mode 100644 addons/wind_deflection/data/wind1.paa create mode 100644 addons/wind_deflection/data/wind10.paa create mode 100644 addons/wind_deflection/data/wind11.paa create mode 100644 addons/wind_deflection/data/wind12.paa create mode 100644 addons/wind_deflection/data/wind2.paa create mode 100644 addons/wind_deflection/data/wind3.paa create mode 100644 addons/wind_deflection/data/wind4.paa create mode 100644 addons/wind_deflection/data/wind5.paa create mode 100644 addons/wind_deflection/data/wind6.paa create mode 100644 addons/wind_deflection/data/wind7.paa create mode 100644 addons/wind_deflection/data/wind8.paa create mode 100644 addons/wind_deflection/data/wind9.paa create mode 100644 addons/wind_deflection/functions/fnc_bulletflight.sqf create mode 100644 addons/wind_deflection/functions/fnc_clockwind.sqf create mode 100644 addons/wind_deflection/functions/fnc_fired_driftchart.sqf create mode 100644 addons/wind_deflection/functions/fnc_fired_man.sqf create mode 100644 addons/wind_deflection/functions/fnc_getWind.sqf create mode 100644 addons/wind_deflection/functions/fnc_keypressed.sqf create mode 100644 addons/wind_deflection/functions/fnc_serverController.sqf create mode 100644 addons/wind_deflection/functions/fnc_wind_intuitive.sqf create mode 100644 addons/wind_deflection/functions/script_component.hpp create mode 100644 addons/wind_deflection/script_component.hpp create mode 100644 addons/wind_deflection/stringtable.xml diff --git a/addons/wind_deflection/$PBOPREFIX$ b/addons/wind_deflection/$PBOPREFIX$ new file mode 100644 index 0000000000..519fbab8a9 --- /dev/null +++ b/addons/wind_deflection/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\wind_deflection \ No newline at end of file diff --git a/addons/wind_deflection/CfgEventhandlers.hpp b/addons/wind_deflection/CfgEventhandlers.hpp new file mode 100644 index 0000000000..c32240b06a --- /dev/null +++ b/addons/wind_deflection/CfgEventhandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + serverInit = QUOTE(call COMPILE_FILE(XEH_PostServerInit)); + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; +class Extended_FiredBIS_EventHandlers { + class Man { + class ADDON { + clientFiredBisPlayer = "if (!isNull (_this select 6) && {((_this select 6) isKindOf 'bulletBase')}) then {_this call ace_sys_wind_deflection_fnc_fired_man}"; + }; + }; +}; diff --git a/addons/wind_deflection/RscTitles.hpp b/addons/wind_deflection/RscTitles.hpp new file mode 100644 index 0000000000..f11b36c078 --- /dev/null +++ b/addons/wind_deflection/RscTitles.hpp @@ -0,0 +1,35 @@ +class RscTitles { + class ACE_RscWindIntuitive { + idd = -1; + onLoad ="with uiNameSpace do { ACE_RscWindIntuitive = _this select 0 };"; + movingEnable = 0; + duration = 10; + fadeIn = false; + fadeOut = false; + controls[] = { "ACE_RscWindIntuitive_BG", "ACE_RscWindIntuitive_1" }; + class ACE_RscWindIntuitive_BG { + idc = -1; + type = 0; + style = 128; + font = "TahomaB"; + colorBackground[] = {0,0,0,0}; + colorText[] = { 0,0,0,0}; + text = ""; + sizeEx = 0.027; + x = "SafeZoneX + 0.001"; + y = "SafeZoneY + 0.04"; + w = 0.3; + h = 0.3; + size = 0.034; + }; + class ACE_RscWindIntuitive_1: ACE_RscWindIntuitive_BG { + // TITS = 1591514 + idc = 1591514; + style = 48; + colorText[] = {0,0,0,0.1}; + font ="Bitstream"; + sizeEx = 0.03; + text = ""; // text = "x\ace\addons\sys_wind_deflection\data\windxx.paa"; + }; + }; +}; \ No newline at end of file diff --git a/addons/wind_deflection/XEH_postInit.sqf b/addons/wind_deflection/XEH_postInit.sqf new file mode 100644 index 0000000000..10c4c1efdb --- /dev/null +++ b/addons/wind_deflection/XEH_postInit.sqf @@ -0,0 +1,33 @@ +//XEH_postInit.sqf +//#define DEBUG_MODE_FULL +#include "script_component.hpp" +"ACE_WIND_PARAMS" addPublicVariableEventHandler { ace_wind_period_start_time = time; }; +"ACE_RAIN_PARAMS" addPublicVariableEventHandler { ace_wind_rain_period_start_time = time; }; + +_func = { + _wind = ([] call FUNC(getWind)); + setWind [_wind select 0, _wind select 1, true]; + // _nWind = wind; + // _pW = [_nWind select 0, _nWind select 1, 0] call CBA_fnc_vect2polar; + // _pAW = [_wind select 0, _wind select 1, 0] call CBA_fnc_vect2polar; + // hint format["w: %1 %2\na: %3 %4", _pW select 1, _pw select 0, _pAW select 1, _pAW select 0]; + // diag_log text format["ACE_WIND,%1,%2,%3,%4,%5", time, _pW select 1, _pw select 0, _pAW select 1, _pAW select 0]; +}; + +[_func, 1, []] call CBA_fnc_addPerFrameHandler; + +_rainFunc = { + if(GVAR(enableRain)) then { + if(!isNil "ACE_RAIN_PARAMS" && {!isNil "ace_wind_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 - ace_wind_rain_period_start_time) min _transitionTime; + _periodPercent = (_periodPosition/_transitionTime) min 1; + + 0 setRain ((_periodPercent*(_rainStrength-_oldStrength))+_oldStrength); + }; + }; +}; + +[_rainFunc, 0, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/wind_deflection/XEH_postServerInit.sqf b/addons/wind_deflection/XEH_postServerInit.sqf new file mode 100644 index 0000000000..6e6516f057 --- /dev/null +++ b/addons/wind_deflection/XEH_postServerInit.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +[FUNC(serverController), 60] call cba_fnc_addPerFrameHandler; diff --git a/addons/wind_deflection/XEH_preClientInit.sqf b/addons/wind_deflection/XEH_preClientInit.sqf new file mode 100644 index 0000000000..cb4cc640f8 --- /dev/null +++ b/addons/wind_deflection/XEH_preClientInit.sqf @@ -0,0 +1,34 @@ +#include "script_component.hpp" +#include "\ca\editor\Data\Scripts\dikCodes.h" + +PREP(bulletflight); +PREP(fired_man); +PREP(clockwind); +PREP(wind_intuitive); +PREP(keypressed); + +GVAR(running) = false; + // Settings for MP missions. in SP clientside config takes priority +GVAR(force_drift_on) = true; //true: drift always on, don't allow client to turn it off + //false: client setting will determine whether he has drift +GVAR(force_drift_off) = false; //true: drift always off, don't allow client to turn it on + //false: client setting will determine whether he has drift + +GVAR(presstime) = 0; +FUNC(KEEPTIME) = { + if((count GVAR(WINDSPEED)) > 0) then { + private ["_wind", "_p", "_str"]; + _wind = ACE_wind; + + _p = _wind call CBA_fnc_vect2polar; + _str = format["Wind: %1 at %2m/s (%3MPH)\n%4", floor(_p select 1), floor(_p select 0), floor((_p select 0)*2.23693629), GVAR(WINDSPEED)]; + TRACE_2("Wind",_wind,_str); + }; +}; + +[QUOTE(ADDON), "Toggle_Wind_Info", { [_this] call FUNC(keypressed) }] call CBA_fnc_addKeyHandlerFromConfig; // sys_eject: Uses same keypress to show Altimeter while in a parachute or skydiving + + +#ifdef DEBUG_MODE_FULL + [FUNC(KEEPTIME), 0.0, []] call CBA_fnc_addPerFrameHandler; +#endif diff --git a/addons/wind_deflection/XEH_preInit.sqf b/addons/wind_deflection/XEH_preInit.sqf new file mode 100644 index 0000000000..69beb2a6b7 --- /dev/null +++ b/addons/wind_deflection/XEH_preInit.sqf @@ -0,0 +1,55 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +ADDON = false; +LOG(MSG_INIT); + +GVAR(enableRain) = false; + +ace_wind_initial_dir = (random 360); + +ace_wind_initial_speed = (overcast*15)+(random (overcast*5)) max 1; + +ace_wind_overcast_multiplier = 1; + +ace_wind_mean_speed = ace_wind_initial_speed; + +ace_wind_mean_dir = ace_wind_initial_dir; + +ace_wind_current_speed = ace_wind_initial_speed; + +ace_wind_current_dir = ace_wind_initial_dir; + +ace_wind_current_range_speed = -1+(random 2); + +ace_wind_current_range_dir = -1+(random 2); + +ace_wind_next_period = -1; //ceil((2+random(5))/(ace_wind_overcast_multiplier/10)); + +ace_wind_next_major_period = -1; + +ace_wind_period_count = 0; + +ace_wind_major_period_count = 0; + +ace_wind_total_time = 0; + +ace_wind_period_start_time = time; + +ace_wind_rain_next_period = -1; + +ace_wind_rain_period_count = 0; + +ace_wind_rain_initial_rain = 0; +if(overcast >= 0.7) then { + ace_wind_rain_initial_rain = (random ((overcast-0.7)/0.3)); +}; + +ace_wind_current_rain = ace_wind_rain_initial_rain; + +ace_wind_rain_current_range = -1+(random 2); + +PREP(serverController); +PREP(getWind); + +ADDON = true; diff --git a/addons/wind_deflection/cfgAmmo.hpp b/addons/wind_deflection/cfgAmmo.hpp new file mode 100644 index 0000000000..1072574cfc --- /dev/null +++ b/addons/wind_deflection/cfgAmmo.hpp @@ -0,0 +1,45 @@ +class cfgAmmo { + class BulletCore; + class BulletBase: BulletCore { + ace_windcoef = 0.4; + }; + class B_545x39_Ball: BulletBase { + ace_windcoef = 0.55; + //ace_drift[] = {{0,0},{100,0.03},{200,0.07},{300,0.25},{400,0.42},{500,0.79},{600,1.27},{700,2},{800,2.98},{900,4.35},{1000,6.2}}; + }; + class B_556x45_Ball: BulletBase { + ace_windcoef = 0.55; + //ace_drift[] = {{0,0},{100,0.03},{200,0.07},{300,0.17},{400,0.37},{500,0.71},{600,1.2},{700,1.81},{800,2.75},{900,4},{1000,6.2}}; + }; + class B_762x39_Ball: BulletBase { + ace_windcoef = 0.59; + //ace_drift[] = {{0,0},{100,0.05},{200,0.1},{300,0.38},{400,0.75},{500,1.37}}; + }; + class B_9x39_SP5: BulletBase { + ace_windcoef = 0.2; + //ace_drift[] = {{0,0},{100,0.06},{200,0.25},{300,0.6},{400,1.1}}; + }; + class B_762x51_Ball: BulletBase { + ace_windcoef = 0.4; + //ace_drift[] = {{0,0},{100,0.03},{200,0.08},{300,0.18},{400,0.305},{500,0.57},{600,0.92},{700,1.3},{800,1.85},{900,2.5},{1000,3.3}}; + }; + class B_762x54_Ball: BulletBase { + ace_windcoef = 0.45; + //ace_drift[] = {{0,0},{100,0.025},{200,0.085},{300,0.19},{400,0.36},{500,0.6},{600,0.98},{700,1.45},{800,2.1},{900,2.9},{1000,4.15}}; + }; + class B_127x99_Ball: BulletBase { + ace_windcoef = 0.24; + //ace_drift[] = {{0,0},{100,0.013},{200,0.03},{300,0.07},{400,0.139},{500,0.211},{600,0.41},{700,0.46},{800,0.7},{900,0.93},{1000,1.24},{1100,1.6},{1200,2},{1300,2.42},{1400,3},{1500,3.66},{1600,4.35},{1700,5.2},{1800,6.1},{1900,7.2},{2000,8.4}}; + }; + class B_127x108_Ball: BulletBase { + ace_windcoef = 0.24; + //ace_drift[] = {{0,0},{100,0.013},{200,0.03},{300,0.07},{400,0.139},{500,0.211},{600,0.41},{700,0.46},{800,0.8},{900,1.1},{1000,1.5},{1100,1.9},{1200,2.3},{1300,2.87},{1400,3.5},{1500,4.25},{1600,5.05},{1700,6.1},{1800,7.25},{1900,8.55},{2000,11.2}}; + }; + class B_127x107_Ball: BulletBase { + ace_windcoef = 0.24; + //ace_drift[] = {{0,0},{100,0.013},{200,0.03},{300,0.07},{400,0.139},{500,0.211},{600,0.337},{700,0.46},{800,0.64},{900,0.85},{1000,1.15},{1100,1.45},{1200,1.9},{1300,2.3},{1400,2.9},{1500,3.53},{1600,4.35},{1700,5.2},{1800,6.3},{1900,7.4},{2000,9.7}}; + }; + class B_86x70_Ball_noTracer: BulletBase { + ace_windcoef = 0.25; + }; +}; \ No newline at end of file diff --git a/addons/wind_deflection/config.cpp b/addons/wind_deflection/config.cpp new file mode 100644 index 0000000000..5c332f1eaf --- /dev/null +++ b/addons/wind_deflection/config.cpp @@ -0,0 +1,28 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + //weapons[] = { "ACE_Kestrel4500" }; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "ace_common" + }; + version = VERSION; + author[] = {"q1184", "Rocko"}; + /* + class ACE_Options { // ACE Options + group = "INTERACTION"; + title = " "; // Empty (WITH A SPACE IN BETWEEN!!!!!) if no CAPTION TEXT is wanted + class Toggle_Wind_Info { // Points to CBA Events, e.g for the keypress registered within CBA + title = $STR_ACE_MENU_MEASUREWIND; + }; + }; + */ + }; +}; + +#include "CfgEventhandlers.hpp" +#include "CfgAmmo.hpp" +//#include "RscTitles.hpp" diff --git a/addons/wind_deflection/data/icon/icon_ace_wind_ca.paa b/addons/wind_deflection/data/icon/icon_ace_wind_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..6e72fd35aed60b2c06bac72737d6c3c6f8efbe4a GIT binary patch literal 1522 zcmb_cO=uHA6n@)osJ*nQBzRCrpb<~Si$uXgcF`maC!eCKfk>wD@-R=bQKDec!y99gm2| zb>l>QR9A_}w(WZopVdz@7BI$f{Zx#xf}8P3EOti2w}m?m$Fzs&1MZz$kb*=ijm?F> zHXE~`Bl3VnRGG>V;JhW2f_8;#)a8t02BNX2x0*$<9$}Q!I{EaR5HHfHvW(V}2EsC- zL^dR`X_`C5$T$8iJh>^yD;}Sy{;5ayLl+7l^&MMWNR_W&n`dMgs!D5c-hKCgv1uZX zdb6S4Y>;u(j7AUM&tEAQZ+>a}_pXF5m(MK^JAOqGG;FD8jD0YEv$gr$_~gdX$>Wf~ z{iW-7)gu~ZjN~os^O@$6mA=ZIR=lFL{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8MgV%=c;@N#*A6j&SVINdDkU?f+nHSRwJ@&%Qs2@p^m6=~L?@#PT3d*WV zND$}ur6ymazzFY5L7sndqs;ML27@Bsv-8XuoQ>t7Mum+5%13N`0~N2#V%n7E#Og9` z58y6h{-=H{Bhte|Kw9#7-V&hrsE;s(DlyE_6qi}r?GNHx>#~|l^hUhz0*BDomV|V^ zQ~0TA9}*Cd=U`^RuDB-~_CaL1J;9rg&I9cYDvvk;nJvB{+(lpE?sxvUGw0lw?CwdZ z4+$K?*yajveNjgd*AFPjnD0Ms`GfiWePG0PAQ#$u#&{wrG`k&4!H;jyHY69fxqTqJ z2&n=45PYM*u=iSi)<&2tn(wOu{ygCun7kh!Yv_llX)h2*sl^{)`u@P@Z}JyFF3jiS zd?lulRdi`SzVUu%QHMX@h(GV+8|W^As-Upo8@=jxsNWc~F})DRD{hbAE@)N@@C~?R zj3<(^%oF0>58lEWPoj4K-{6;U{;C@5Phi4$AI$46J~Pzu8R_j0I}GH)v=0IfWYJYH zg~RSY4ErFG{W>QX+&+-ZDBB=&iGJF!2d6sH@f&XakL)pjO=5F%r~C1Zz{{|h(HYWZ zcns+Mp-~;9{rE=kM_?ayx;cM!g$_4-MtXl@_uk1jU|7hO9F=^0fE6+&q-(K^V14!gTkVB2IU8)fBVLi%! zrx^LIu%5fO#Rsduc_dmZNYZlnwhV zd^3zyg?-|fpW%J7!dCr`$qbkNo9gWL2Z24_r^wEuc^!UX6_2%+>Bm-FfWsr)-=y{| zFJuD&8~n4zEW9FQfrqdMW7HbS?}H6J0UWnB69~dhzoe+wX*F*+92vus<&pmjWfLmG{jKCbnuhNm_mssvRar zO4OPO(LbzyYcI;h#VQHutC7FfOw`6$AY*S Mwfv=^s$?47zbcoN`v3p{ literal 0 HcmV?d00001 diff --git a/addons/wind_deflection/data/wind11.paa b/addons/wind_deflection/data/wind11.paa new file mode 100644 index 0000000000000000000000000000000000000000..55f3f427f0dfa3bbc9e8a349c538f76091260c52 GIT binary patch literal 22016 zcmeHP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~iis3=jjv05L!e5Ci@)!0{abp=p~@_yy0_%79+M_em5ZC?uSI1aq>7?7!LZPzL&GxbW<}t75 z1=c@*=QI;l_~1Edcn^FxICgB`_}ADzcxs)mf&1a9dhPx>(kzxLA8W6a@0lonS+)nV%tW;Ba3s^^r6EBck^^Z40obs8 z(0s#TJNB2shS-F%ap0dcB*;1ukFfWy9MX@y9L}$n6X;s^9=JSx9Up3WjsHq zB%&Ppq=!MJSu(9;E9I+E;cWuZ)Uq1cY(qB+h4o_Q_07@@y!yi|j#_mUR;_2&5XI5% e=|w(tb`gLP75H57(4}9$xb#Xdnu$Yk+4&pzZ`qIl literal 0 HcmV?d00001 diff --git a/addons/wind_deflection/data/wind2.paa b/addons/wind_deflection/data/wind2.paa new file mode 100644 index 0000000000000000000000000000000000000000..367c2ea9cdbf7c702bde4173902862eb65ddbfdc GIT binary patch literal 22016 zcmeHPeM}Tb6rZImiV6qf7AamiBZx+AG;J?!mAEK^XQi&~4QfqIL8?>(`bT4J)F}23 zll~!J*0e>iZEPE3qNvT9exy)H6H;R^O;z+P7AqfGEjHJ*UO3#oH?zkb7o*UE2+SnM z-P@g=kKgaTc{8(bkd2ItROiBstkh6Kh}-QBXY$I_Oq2~sC}*TDO-EUR56Z8kr!Q0C z_b&MCfggJ{Lf&^0a)1)@8+>}7c3~N6@AHeC0s(=5KtLcM5D*9m1Ox&C0fB%(Kp-Fx z5C{kaMkoRjag-)H#wQvEA(YbPBNT>V)9uF?pT#Dh3QegjtuZ_YaX$_iCM4$E?vi9C zae3Vdy<)t1HyZBSHtE&~Q^x(c+Kj(wroNGly{Q?^uMqP5 zEyFWve%EPJKh!X?75od=M-B9GDD{0Lv~^BB^83a$#xGT*-PiT?UNC8tfo)$c`pj1_!UB|#|`5`q3JJ(MqeX~yY1Hr1w45{Uq3}J_=i6)OYw%| zqg+SHS>N;1gYpk@_lJG;32eSs8fx;ZEHL!^)#-J7KBh>-7&{p;P<{N6Zw;fmXg0i{ zWtW}d?hhk;^8*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/data/wind3.paa b/addons/wind_deflection/data/wind3.paa new file mode 100644 index 0000000000000000000000000000000000000000..deb33ec80efbf06952358d4b0dbdb2e5bb2de33d GIT binary patch literal 22016 zcmeI4U1%It6vxk$OxmDv)8I5K#xjz;q*PFpE%m|PMY`)s(@t@23D$>JTSYKgp9Im8 z)e7oEO&SqGt<(ph4@DX@jJ~L81xck;rL>JrKWGxsmlkEkT6QUly%p%i?rFz zxv)EP=1yks{hf0^X6}Dtt9U%>KOWx_Z2*8wCex(to@h7O3KQA!=!O{C7JkTnDi+%$ za6g5gw{hn^58wkIV7~;I#?OtX6kS8y`1yP$6JP>NfC(@GCcp%k025#WOn?b60Vco% zm;e)C0!)AjFoDHHU>G09r|z0j3P3ux-F#(tZd_f%$M*o909bW8=$#Dio6z}E;^TTw z^+X^AiNVgqP$&7PU?8@DMC2a zGl90T@nkyKIjQ5pcI5DRl~&i1SrZ>%g^zr;>umq;IzD{t9eMzRDeNfC(@GCcp%k025#WOn?b60Vco%m;e)~ zAp(L_CN0GRySQf-FU%pfnFq&1e(?^Q1h)rn54WQ|teC-N=Eh5pQ6x%fSwhPU{w))& z*Z6e5i}ih&m%&)Jlz0AkFc<$m`6uxZxbnJU6f?`nB>yiSTE>_d(y}XD#kGySq+lDF zW8&7?;KLFCBO68)DYXCg>RYpa&1%^J2@f7P6Le38vPNd^2}ER)i<@fVS3y%z=8pJD z)>pJKAaA*S_hFSp8HJI}qCYy1tK>{3eMa}xsH1vxcYk(b#4N*$>tr?6*5A;(ef@ve zNsRA;Y|OE(hkuEk_(rws*Gepsi9KCjR#L0=E#-`~%j$hUupN_j^GSw+3nx3vCj z8v^X#>iTbvAC4a);Nqv;`0r8<{i8vXT-=m9EuUTSGMsM+xVRyHEuY|+6?{5ortMOg z+{$h!&BwP3Q9am-*P>~^w2VDB&79A^1o!L@CpHf0X_4(fxHU4M)zIKr5IX((;L*c}~@bEV(MV(H}Kce(PJ z+{!#(c!6%1XOGgqTPzL9D#6^TO|@>DOONv&l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qPP)SKP|_@UFp> zCdkQaLsG^zkQUgRFHb==JV}R+8&e13%8clG4Tsshmnz;jgi)OfoA4l0Bo8hxy??kc zk_SgD>Kg!i@v*zCXrRAuf7+={gUUibnremdFTzH-zcV7wezKwD+_JIXvWAtlb;?o8 zlCf$Z)D+2sb1d|gwZ#rURi8w_gFmW&1m z3_E4IKA3kO_QFkb;fxs##~fJrU}rR;Vf{qj`cX-1(nb4xq$SMb_IB>3p0EXSUdcG| zyQO2Glu63gKOPn*baQhj9Ui-AnY};^TPDICTgcn~e974j{5<_?qBfdUpZnyUBUz5# z?chPPV!^j5wp~7D$s=;u*R*wo+wyMCtCrDOP~J)p-WJ;JM$?&5(R8tTzC`!GYj!et zDo~4Pamlou3vVvT^;Y)7o0+uAzCD<-=v_fOpQ&X%$TUrz?9vd#kg51ZF`IB6EmOPE zZ1nm!7c73^P=7AZ&CNJjk4-ev+XJo6D<7%fgNvTfEQM0o%g!u9Gm{tHBAZ#DCuec9 rS493-!DETtn&qQ}**Cgso2F$Y!J-1s0`fk7NB{LAWXv)(H>B?`PI`3m literal 0 HcmV?d00001 diff --git a/addons/wind_deflection/data/wind5.paa b/addons/wind_deflection/data/wind5.paa new file mode 100644 index 0000000000000000000000000000000000000000..0ae1f9f175bac88303e4f9574a277a2db60efc5a GIT binary patch literal 22016 zcmeHPeQXp(6rU|!?4k5pyrq2D+>y2vErP`4qN&(Dgw|6Uirh3P0&UM|wDe9BQ;AYr z@dGtMDrhhWRFpp?lC)J=f<-A*p;4hGCeU&kK3c4zNM-^}~ilUYuV&2djozAcsz;`8|ooL*?lMVdiFI>$CQ8)*qPq!(mo&r{)d z1#GL}#~XQsyzL-lBPFC2wo7jnIEH%Z$BQEc0s;YnfIvVXAP^7;2m}NI0s(=*AR}Ph zsFirErvi)-La8jpKcn61SrceLdcGr19puZ4;s0j@7%^0u>~DR6@|I*pAr0lfEoDA% zkAvRp1H`^I)xI({s2>zuVbOGrz^?9U_LI?%@&=8NR-CRaYu+1ZLK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nzW9&k^Wm7V{A@9O(sU_Dy0@FpKF-T7KpmtR zZmn>UW(e^wo7Vfc1X|XYh0-cLWm&_8|J)yzocvoW;`Sex2M?ZvoMQP)yzC6J&?Nq6 zt2?D8X+O$amQ8AY>&|E1S<~_n(k5K4FE@6^q<2b4=Rxa>?{K4Sb=IPA*qq3ePTI&m z@WU?T4-inscAob^nl&wK3(Tihm3eA&dA}a`A4p!KlpcHlo=9530w;zs!7&6a@c1|S zU_s5nKN<`+3w-^XVM3=5ni@`ThGnz0AOp<;{2PcIs;&-CBZIz-PTv{5Y)Lo+ubOXN z-H7+oyBct)@XI=pUy@@jdKa&6gTKd!TQRh5g{9B5-A0!0PkUkAEqFihHjQNX4(_M4 z;3h7wIg)gx^`n6=Bi`J~$A4LtPm|X+jLV(OtGy&SfwYl3$7Jk?nTGvRuj-4zl8@Ay z=UfCVEQ&C!Ys literal 0 HcmV?d00001 diff --git a/addons/wind_deflection/data/wind6.paa b/addons/wind_deflection/data/wind6.paa new file mode 100644 index 0000000000000000000000000000000000000000..d5cebb39fa5853d90aa07e834923fba76651e1cc GIT binary patch literal 22016 zcmeHPU1%It6uzT7NrQ&n)SV`hCK+iSY-vFeHpEaei!|Fne+D{JilQc6MM1h-1bt~k z)*mS1&xVRvY9$ClANtTl>L`fhM@TK&B8JA)ZLM}|<3pNQ7P}4Ebv)*ml?wLFH+^lGZLP71Z(C(mzF*ZFtUB>l2!R@G zOUq6L{*J+M2>y6SW$ZnTv12-8NjT;&F|0$Ge|aiN2oM5<03kpK5CVh%AwUQeAp#~V z>%y05GA4qUOu4HbUZ|@eMQ9Rr*#QE?zXPybSd{p8A*l{bBK{qK<-(%GzY9rqU=s1~ z04x_4CH`GVssodVe+OW>uqg5GLQ)-=MEpAd%Y{XWe;1PKz$D_|0az|9O8mQ!R0k#z z{|>-%VNv40$VolI*n>Y`hV7Az>7u|IV#dBiZ^tOtb**6jcCq}&SnJ{X*25mFJzZkZ zA6D`EeU`2&MUL)@?|x|FTr_ht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p%u^hM(o2(HmrZU9K+s}eHR#vh8usMofk5g??d_1#`x%sx``wJei z`Pq3^STNhxE;(ZN$=HW%Cn4otGpvCH!pweKFPjbsI6fqc4kGElS=*LwzcAPS(*Dl< zL&ydKg1@fqo#-FI-9H={%L)6TK_fZvW)1D^8zJ`$k0JbYpwG=4x&bzzBEdM_`;zZ; zZyg^(V~gn#2!g^YSuLCtk?(i>CCQMho;jE5C_k zY*}`+qMY4Nfty!P(yOo7vaT`NHH?s%mz~FIzA?<2gmBGiee9;%>JI0%o6&?4q6wV` zN;bcFvVfaWco}rArcJK>$ap?g)kVZiR{e!+AkbYr>})9z?yQ-*d)fWUXMM~I*~i_ibNwSo1ba+)9M`S^T$?D3j7ftWK9a|-QthOZK>_Vq%g<(Vm So+(huo2kYT6)LG_Nb`S7i*nrn literal 0 HcmV?d00001 diff --git a/addons/wind_deflection/data/wind9.paa b/addons/wind_deflection/data/wind9.paa new file mode 100644 index 0000000000000000000000000000000000000000..e16e5cee7e599a8a5da330566ad58be016ddc3b3 GIT binary patch literal 22016 zcmeI4U1%It6vxk$OiXCwrp0Ljjd3IklD0ub*isR47s+k{)($u~6#J4!!3Laeo&+r= ziGA>`DG?#qmLMoT^g$_Q^rf2ip|mQbAgyWB`jN!ygN8z&A?&W#bMBpN+9+(2MzgNx z!pzRe-kH7kch0?YX68S!RXUyYpHFutD*zyy%~orBUvdxG3JclkH8n>b~u1z<8AO^yLZEvcOD|!_k?(W zpWLs)rzMHSo_S~rPHi*ritA_DtJfpkWzr_)kR*h-^ z7asmm``dAxuG1Gs$irmQL+iHRmBN#?F1q1^_}9qt(c6m7_xOd07q*M>C@tp$RG$tr zbBS(!K6Y$dcIC*qgL+MECI72fuFs5jf&Ru4&F3^ju)Q)Kgs+rK^JdXJHxkHbFDi4Gis!|(XeIWNfC(@GCcp%k025#WOn?b60Vco%m;e)C0!(17 z2nhNg0JVjqxwwVTTFk>2+-943a6IsMz^OnN7uOsQe~pKYOJwUiN!HwW>M^P*WzxXI zb-D0sd>Q+9k8JyypA(b${QM~O7iFHJ`P+MCor{lY|Ev9f_GlPvdt*k+5>U2m#lM*u z>5Gxdja)0>kxx*w9Oku6DpoDy>(~&<8rRKUkVzC|RjcLS^4;ysbl78L8kQ{^epTvv z-v`g>{?pNY6{9>t+bGLGECtyQ>45)zTNGsD=#PR-V72|n9_r%an&!W)XYZG}ZMyPg zF8!5}xd~Lhx)*VLoXzX;ASDUiOmXpp_K(c6nGeJgnb+3oH)}3LG7cfuo`1RV;OD#iLT~yF0$!4y1`(8UtX>VZE$x>SXbbDgg!r*Y~=t)W# z=xw=%3+=r(&g>b|354(?HSA)VY1FYrZC4*pN>Qx+l{eoy_)+4ZPWu4UzMmjIAMfqn zsed2E`u$7Nyk*#hv<$O?6{lsjAEsViP={Kp*uPkR|L@<|(yhQkRIhrrsynBz4tJO^ zb8K-u48{jqa7w{2_B^~^A`$mun7V@MKN`IRBE6>1?sjjBvPaZ}%XcBz_(YF+2^2h! z;`Y9)3s=z9SM*Zw8iYj^RMBnGn8afyeoL8dv|05oHS^S{v9T3idu0`d4B1v2zT4nd dzrN56itY-WQITim> "CfgAmmo" >> _ammo +private ["_unit","_t","_vel","_timeprev","_coef","_ammo","_c","_dt","_bullet"]; +_bullet = _this select 0; +_unit = _this select 2; +_ammo = _this select 3; +_c = 1.42 * getNumber(__cfg >> "ace_windcoef"); +_timeprev = time; + +//_wind = ACE_wind; //constant wind cheat +_bulletFunc = { + _bullet = (_this select 0) select 0; + if (alive _bullet) then { + _coef = ((_this select 0) select 1)*accTime; + _vel = velocity _bullet; + _wind = ACE_wind; + _vel set [0, (_vel select 0) + (_wind select 0)*_coef]; + _vel set [1, (_vel select 1) + (_wind select 1)*_coef]; + #ifdef DEBUG_MODE_FULL + drop ["\Ca\Data\Cl_basic","","Billboard",1,30,getPos _bullet,[0,0,0],1,1.275,1.0,0.0,[0.125],[[1,0,0,0.5]],[0],0.0,2.0,"","",""]; + #endif + _bullet setvelocity _vel; + //TRACE_1("",_wind); + } else { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; +}; +_time = 0.075; + +_h1 = [_bulletFunc, _time, [_bullet, _c*_time]] call cba_fnc_addPerFrameHandler; diff --git a/addons/wind_deflection/functions/fnc_clockwind.sqf b/addons/wind_deflection/functions/fnc_clockwind.sqf new file mode 100644 index 0000000000..8817510bfa --- /dev/null +++ b/addons/wind_deflection/functions/fnc_clockwind.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +private ["_pd","_wd","_a","_ws"]; + +_pd = getdir player; //player dir +_wind = ACE_wind; +_wd = (_wind select 0) atan2 (_wind select 1); //wind dir +if (_wd < 0) then {_wd = _wd + 360}; + +//_ws = _wd + 180; //angle to wind source +//if (_ws > 360) then {_ws = _ws - 360}; + +_a = _wd - _pd; //angle from player dir to wind source +if (_a < 0) then {_a = 360 + _a}; + +if (_a >= 345 || {_a <= 15}) exitwith {12}; +if (_a > 15 && {_a <= 45}) exitwith {1}; +if (_a > 45 && {_a <= 75}) exitwith {2}; +if (_a > 75 && {_a <= 105}) exitwith {3}; +if (_a > 105 && {_a <= 135}) exitwith {4}; +if (_a > 135 && {_a <= 165}) exitwith {5}; +if (_a > 165 && {_a <= 195}) exitwith {6}; +if (_a > 195 && {_a <= 225}) exitwith {7}; +if (_a > 225 && {_a <= 255}) exitwith {8}; +if (_a > 255 && {_a <= 285}) exitwith {9}; +if (_a > 285 && {_a <= 315}) exitwith {10}; +if (_a > 315 && {_a < 345}) exitwith {11}; diff --git a/addons/wind_deflection/functions/fnc_fired_driftchart.sqf b/addons/wind_deflection/functions/fnc_fired_driftchart.sqf new file mode 100644 index 0000000000..4ef4f00bc4 --- /dev/null +++ b/addons/wind_deflection/functions/fnc_fired_driftchart.sqf @@ -0,0 +1,43 @@ +//dumps distance-side drift data for each frame into the rpt + +#include "script_component.hpp" +//PARAMS_3(_u,_w,_magazine); +#define __cfg configFile >> "CfgAmmo" >> _ammo + +if (isNil QUOTE(FUNC(supah_funwind))) then { + FUNC(supah_funwind) = { + private ["_defl","_pos0","_pos","_dist","_cos","_dir0","_dir","_d","_b"]; + PARAMS_3(_pos,_pos0,_dir0); //cur bullet pos, init bullet position, init bullet direction + + _d = _pos distance _pos0; + _dir = [(_pos select 0)-(_pos0 select 0),(_pos select 1)-(_pos0 select 1)]; + _cos = (_dir select 0)*(_dir0 select 0) + (_dir select 1)*(_dir0 select 1); + _b = sqrt( ((_dir select 0)^2 + (_dir select 1)^2)*((_dir0 select 0)^2 + (_dir0 select 1)^2) ); + _cos = if (_b == 0) then {0} else {_cos/_b}; + _defl = _d*sqrt(1 - _cos^2); + TRACE_2("",_d*_cos,_defl); + }; +}; + +private ["_unit","_weapon","_ammo","_bullet","_veh","_vel"]; + +_bullet = _this select 5; +if (isNull _bullet) exitwith {}; + +_unit = _this select 0; +_weapon = _this select 1; +_ammo = _this select 4; +_veh = vehicle player; + +if (_bullet isKindOf "bulletBase") then { + [_bullet, velocity _bullet, getpos _bullet] spawn { + private ["_pos0"]; + PARAMS_2(_bullet,_vel0); + _pos0 = [(_this select 2) select 0,(_this select 2) select 1]; + + while {alive _bullet} do { + [[(getpos _bullet) select 0,(getpos _bullet) select 1],_pos0,_vel0] call FUNC(supah_funwind); + sleep 0.001; + }; + }; +}; diff --git a/addons/wind_deflection/functions/fnc_fired_man.sqf b/addons/wind_deflection/functions/fnc_fired_man.sqf new file mode 100644 index 0000000000..e6e4d54e7c --- /dev/null +++ b/addons/wind_deflection/functions/fnc_fired_man.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" +#define __enableWindClient (["ACE", "ACE_WIND_CONFIG", "enable_drift"] call ace_settings_fnc_getNumber) + +private ["_unit","_weapon","_ammo","_bullet","_go"]; + +// mission global variables (force_drift_on/off) override clientside drift setting +_go = __enableWindClient; +if (isMultiplayer) then { + if (GVAR(force_drift_off)) exitwith {_go = 0}; + if (GVAR(force_drift_on)) exitwith {_go = 1}; +}; +if (_go == 0) exitwith {}; + +[_this select 6,_this select 1,_this select 0,_this select 4] call FUNC(bulletflight); diff --git a/addons/wind_deflection/functions/fnc_getWind.sqf b/addons/wind_deflection/functions/fnc_getWind.sqf new file mode 100644 index 0000000000..5b7a8c6bbd --- /dev/null +++ b/addons/wind_deflection/functions/fnc_getWind.sqf @@ -0,0 +1,20 @@ +_return = [0,0,0]; +if(!isNil "ACE_WIND_PARAMS") then { + _dir = ACE_WIND_PARAMS select 0; + _dirRange = (ACE_WIND_PARAMS select 1)-(ACE_WIND_PARAMS select 0); + _spd = ACE_WIND_PARAMS select 2; + _spdRange = (ACE_WIND_PARAMS select 3)-(ACE_WIND_PARAMS select 2); + _period = ACE_WIND_PARAMS select 4; + + _periodPosition = (time - ace_wind_period_start_time) min _period; + _periodPercent = _periodPosition/_period; + _spdInc = _spdRange*_periodPercent; + _dirInc = _dirRange*_periodPercent; + _spd = (_spd + _spdInc); + _dir = _dir + _dirInc; + if (_dir > 360) then {_dir = _dir - 360}; + if (_dir < 0) then {_dir = _dir + 360}; + + _return = [_spd*sin _dir, _spd*cos _dir, 0]; +}; +_return; \ No newline at end of file diff --git a/addons/wind_deflection/functions/fnc_keypressed.sqf b/addons/wind_deflection/functions/fnc_keypressed.sqf new file mode 100644 index 0000000000..9bdbdc5dcf --- /dev/null +++ b/addons/wind_deflection/functions/fnc_keypressed.sqf @@ -0,0 +1,35 @@ +#include "script_component.hpp" +#define __dsp (uiNamespace getVariable "ACE_RscWindIntuitive") +#define __ctrl (__dsp displayCtrl 1591514) + +private["_class","_wpn","_s"]; +PARAMS_1(_keyData); + +//a 'valve' to cut off multiple key press events within 1 frame +if (GVAR(presstime) == time) exitwith {false}; +GVAR(presstime) = time; +if (GVAR(running)) exitwith { GVAR(running) = false; false }; //switch info off +GVAR(running) = true; + +if ((player getVariable ["ace_sys_eject_skydiving",false]) || {((vehicle player) iskindof "BIS_Steerable_Parachute" || {(vehicle player) iskindof "ParachuteBase"})}) then { + [] spawn ace_sys_eject_fnc_showAltimeter; +} else { + if (player != vehicle player && {!(vehicle player iskindof "StaticWeapon")}) exitwith { GVAR(running) = false; false }; // Allow checking wind in Static Laserdesignator and Spottingscope + 0 spawn { + private ["_unit","_str","_clock","_cookie"]; + _unit = player; + 13523 cutRsc ["ACE_RscWindIntuitive", "PLAIN"]; + __ctrl ctrlsetscale 0.75; + __ctrl ctrlcommit 0; + while { GVAR(running) && {player == _unit} && {!(isNull __dsp)} } do { + _str = ACE_wind call ACE_fnc_magnitude; + _clock = call FUNC(clockwind); + _cookie = [_clock,_str] call FUNC(wind_intuitive); + //hint format["dir %1 str %2",_clock,_str]; + sleep 0.5; + }; + GVAR(running) = false; + if (!isNull __dsp) then { 13523 cutRsc ["Default", "PLAIN",3] }; + }; +}; +true; diff --git a/addons/wind_deflection/functions/fnc_serverController.sqf b/addons/wind_deflection/functions/fnc_serverController.sqf new file mode 100644 index 0000000000..6e63ad4517 --- /dev/null +++ b/addons/wind_deflection/functions/fnc_serverController.sqf @@ -0,0 +1,82 @@ +#include "script_component.hpp" + +//player sideChat format["overcast: %1", overcast]; +if(ace_wind_rain_period_count > ace_wind_rain_next_period) then { + if(overcast >= 0.7) then { + _lastRain = ace_wind_current_rain; + _rainOverCast = ((overcast-0.7)/0.3); + ace_wind_rain_next_period = ceil((1+random(10))/(ace_wind_overcast_multiplier)); + ace_wind_current_rain = (ace_wind_current_rain+(((ace_wind_current_rain))*((_rainOverCast*(ace_wind_overcast_multiplier))/8)*ace_wind_rain_current_range)); + ace_wind_current_rain = (ace_wind_current_rain max 0.01) min 1; + _transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20)); + ace_wind_rain_current_range = -1+(random 2); + + + // player sideChat format["lastRain: %1 currentRain: %2", _lastRain, ace_wind_current_rain]; + // player sideChat format["_transitionTime: %1", _transitionTime]; + + + + ACE_RAIN_PARAMS = [_lastRain, ace_wind_current_rain, _transitionTime]; + } else { + ace_wind_current_rain = 0; + _lastRain = ace_wind_current_rain; + _rainOverCast = 1; + _transitionTime = (_rainOverCast*5)+(random (_rainOverCast*20)); + ACE_RAIN_PARAMS = [_lastRain, ace_wind_current_rain, _transitionTime]; + TRACE_4("",_lastRain,_rainOverCast,_transitionTime, overcast); + }; + ace_wind_rain_period_start_time = time; + publicVariable "ACE_RAIN_PARAMS"; +}; + +if(ace_wind_period_count > ace_wind_next_period) then { + _startDir = ace_wind_current_dir; + _startSpeed = ace_wind_current_speed; + ace_wind_current_dir = (ace_wind_current_dir+(((ace_wind_current_dir))*((overcast*(ace_wind_overcast_multiplier))/8)*ace_wind_current_range_dir)); + ace_wind_current_speed = (ace_wind_current_speed+(((ace_wind_current_speed))*(overcast*(ace_wind_overcast_multiplier)/12)*ace_wind_current_range_speed)); + + ace_wind_current_speed = ace_wind_current_speed max 0.01; + + if(ace_wind_current_dir < 0) then { + ace_wind_current_dir = ace_wind_current_dir+360; + }; + ace_wind_current_dir = ace_wind_current_dir % 360; + + ace_wind_current_range_speed = (-1)+(random 2); + + ace_wind_current_range_dir = (-1)+(random 2); + + ace_wind_next_period = ceil((2+random(5))/(ace_wind_overcast_multiplier)); + ace_wind_period_count = 0; + + _gustCount = floor(random(ace_wind_next_period*(overcast*((ace_wind_overcast_multiplier^3))))); + + _time = ace_wind_next_period*60; + _gusts = []; + if(_gustCount > 0) then { + _maxInterval = _time/_gustCount; + for "_i" from 0 to _gustCount-1 do { + _gustTime = (random (3 min _maxInterval)); + _timeTillGust = (_maxInterval*_i)+(random (_maxInterval - _gustTime)); + _gustSpeed = (random 1); + _gustDir = (ace_wind_current_dir+(ace_wind_current_dir*(-1+(random 2))))*(overcast*(ace_wind_overcast_multiplier)); + _gusts set[(count _gusts), [_timeTillGust, _gustTime, _gustSpeed, _gustDir]]; + }; + }; + // diag_log text "-------"; + // diag_log text format["startDir: %1 endDir: %2", _startDir, ace_wind_current_dir]; + // diag_log text format["startSpeed: %1 endSpeed: %2", _startSpeed, ace_wind_current_speed]; + // diag_log text format["ace_wind_current_range_speed: %1", ace_wind_current_range_speed]; + // diag_log text format["ace_wind_current_range_dir: %1", ace_wind_current_range_dir]; + // diag_log text format["gusts: %1", _gusts]; + // diag_log text format["next period: %1", ace_wind_next_period]; + ace_wind_total_time = ace_wind_total_time + ace_wind_next_period; + // diag_log text format["%1,%2,%3,%4", ace_wind_total_time, ace_wind_current_dir, ace_wind_current_speed, _gustCount]; + + ACE_WIND_PARAMS = [_startDir, ace_wind_current_dir, _startSpeed, ace_wind_current_speed, _time, _gusts]; + ace_wind_period_start_time = time; + publicVariable "ACE_WIND_PARAMS"; +}; +ace_wind_rain_period_count = ace_wind_rain_period_count + 1; +ace_wind_period_count = ace_wind_period_count + 1; \ No newline at end of file diff --git a/addons/wind_deflection/functions/fnc_wind_intuitive.sqf b/addons/wind_deflection/functions/fnc_wind_intuitive.sqf new file mode 100644 index 0000000000..09e6a5854e --- /dev/null +++ b/addons/wind_deflection/functions/fnc_wind_intuitive.sqf @@ -0,0 +1,30 @@ +/* fnc_wind_intuitive.sqf | (c) 2009 by rocko */ + +// [5,4] spawn ace_sys_wind_deflection_fnc_wind_intuitive + +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "ACE_RscWindIntuitive") +#define __ctrl (__dsp displayCtrl 1591514) + +#define __path "\x\ace\addons\sys_wind_deflection\data\" + +private["_ar","_str","_str_tmp"]; +PARAMS_2(_ar_number,_str_number); + +// Using Beaufort scale values - assuming wind in ACE is done m/s - otherwise fuck it and make better :) +_nowind = false; +if (_str_number >= 0 && {_str_number < 0.3}) then { _str = [1,1,1,0.5], _nowind = true; }; //Calm / probably never happens in arma (even vanilla has always light wind) +if (_str_number >= 0.3 && {_str_number < 2}) then { _str = [1,1,1,0.5]}; //Light air - white +if (_str_number >= 2 && {_str_number < 3}) then { _str = [0.56,0.93,0.56,0.5]}; //Light breeze - light green +if (_str_number >= 3 && {_str_number < 5}) then { _str = [0.53,1,0.18,0.5]}; //Gentle breeze - green yellow +if (_str_number >= 5 && {_str_number < 8}) then { _str = [1,1,0,0.5]}; //Moderate breeze - yellow +if (_str_number >= 8 && {_str_number < 11}) then { _str = [0.85,0.65,0.1,0.5]}; //Fresh breeze - dark yellow +if (_str_number >= 11 && {_str_number < 14}) then { _str = [1,0.65,0,0.5]}; //Strong breeze - orange +if (_str_number >= 14 && {_str_number < 17}) then { _str = [0.93,0.25,0,0.5]}; //High wind,moderate gale, near gale - red orange +if (_str_number >= 17) then { _str = [1,0,0,0.5]}; //Gale,fresh gale - red + +_ar = if (!_nowind) then { format[__path+"wind"+"%1"+".paa", _ar_number] } else { __path+"wind0.paa" }; + +__ctrl ctrlSetText _ar; +__ctrl ctrlSetTextColor _str; diff --git a/addons/wind_deflection/functions/script_component.hpp b/addons/wind_deflection/functions/script_component.hpp new file mode 100644 index 0000000000..5f8cd51b5b --- /dev/null +++ b/addons/wind_deflection/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\wind_deflection\script_component.hpp" \ No newline at end of file diff --git a/addons/wind_deflection/script_component.hpp b/addons/wind_deflection/script_component.hpp new file mode 100644 index 0000000000..1658fca6bb --- /dev/null +++ b/addons/wind_deflection/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT wind_deflection +#include "\x\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_WIND_DEFLECTION + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_WIND_DEFLECTION + #define DEBUG_SETTINGS DEBUG_SETTINGS_WIND_DEFLECTION +#endif + +#include "\x\ace\addons\main\script_macros.hpp" diff --git a/addons/wind_deflection/stringtable.xml b/addons/wind_deflection/stringtable.xml new file mode 100644 index 0000000000..99ca5de5b1 --- /dev/null +++ b/addons/wind_deflection/stringtable.xml @@ -0,0 +1,18 @@ + + + + + +Wind schätzen +Measure wind +Measure wind +Measure wind +Mesurer vent +Změřit sílu větru +Измерить ветер +Pomiar wiatru +Szél mérés + + + + \ No newline at end of file