diff --git a/README.md b/README.md index dade470553..a813088e96 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@

- ACE version - + ACE download diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index db0140756d..7c01bd9f23 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -53,7 +53,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then { if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; if (_abort || !(GVAR(extensionAvailable))) exitWith { - [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); + if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { + EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; + }; }; _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index d11d7a0a45..40d8d7334b 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -37,6 +37,13 @@ }; }] call FUNC(addEventhandler); + +["HeadbugFixUsed", { + PARAMS_2(_profileName,_animation); + diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation]; +}] call FUNC(addEventHandler); + + //~~~~~Get Map Data~~~~~ //Find MGRS zone and 100km grid for current map [] call FUNC(getMGRSdata); diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf index 272f64a044..fe9354f632 100644 --- a/addons/common/functions/fnc_headBugFix.sqf +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -10,21 +10,33 @@ #include "script_component.hpp" private ["_pos","_dir","_anim"]; -if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {}; -titleCut ["", "BLACK"]; -_pos = getposATL player; -_dir = getDir player; -_anim = animationState player; -// create invisible headbug fix vehicle -_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL player, [], 0, "NONE"]; -_ACE_HeadbugFix setDir _dir; -player moveInAny _ACE_HeadbugFix; -sleep 1.0; -unassignVehicle player; -player action ["Eject", vehicle player]; -sleep 1.0; -deleteVehicle _ACE_HeadbugFix; -player setposATL _pos; -player setDir _dir; -titleCut ["", "PLAIN"]; +_anim = animationState ACE_player; +["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent); +["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent); + +if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false}; + +_pos = getposATL ACE_player; +_dir = getDir ACE_player; + +titleCut ["", "BLACK"]; +[ACE_Player, "headBugFix"] call FUNC(hideUnit); + +// create invisible headbug fix vehicle +_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos; +_ACE_HeadbugFix setDir _dir; +ACE_player moveInAny _ACE_HeadbugFix; +sleep 0.1; + +unassignVehicle ACE_player; +ACE_player action ["Eject", vehicle ACE_player]; +ACE_player setDir _dir; +ACE_player setposATL _pos; +sleep 1.0; + +deleteVehicle _ACE_HeadbugFix; + +[ACE_Player, "headBugFix"] call FUNC(unhideUnit); +titleCut ["", "PLAIN"]; +true diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 2552074377..f11f36d971 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -2,7 +2,7 @@ - Show finger indicator to self + Show pointing indicator to self Отображать пальце-индикатор для показывающего игрока Pokaż indykator wskazywania palcem dla siebie @@ -12,12 +12,12 @@ Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. - Finger indicator + Pointing indicator Пальце-индикатор Indykator palca - Color of the finger-pointing indicator circle + Color of the pointing indicator circle Цвет индикатора пальце-указания Kolor okręgu wyświetlanego przy wskazywaniu palcem @@ -27,19 +27,19 @@ Akcja "wskaż palcem" - Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. + Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany. - Finger Settings + Pointing Settings Ustawienia wskazywania palcem - Finger Pointing Enabled + Pointing Enabled Aktywuj wskazywanie - Finger Max Range + Pointing Max Range Maks. zasięg wskazywania diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 346aec837e..22287f1342 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -12,13 +12,13 @@ * 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"]; -private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; +private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; +private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; -private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; +private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; _pos = _this select 0; _dir = vectorNormalized (_this select 1); @@ -62,17 +62,19 @@ _finalOwner = nil; }; }; }; - _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); + + //Handle Weird Data Return + if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then { + _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); @@ -119,10 +121,10 @@ if((count _spots) > 0) then { _largestIndex = _index; }; } forEach _buckets; - + _finalBucket = _finalBuckets select _largestIndex; _owners = HASH_CREATE; - + if(count _finalBucket > 0) then { _avgX = 0; _avgY = 0; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 7c8a83f4b1..8b752ae67a 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -5,7 +5,7 @@ #define MAJOR 3 #define MINOR 2 -#define PATCHLVL 0 +#define PATCHLVL 1 #define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index d1b7e38dba..30cae96ef6 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -39,14 +39,13 @@ class CfgVehicles { }; }; - class Module_F; - class ACE_ModuleBlueForceTracking: Module_F { + class ACE_ModuleBlueForceTracking: ACE_Module { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(BFT_Module_DisplayName); function = QFUNC(blueForceTrackingModule); scope = 2; - isGlobal = 1; + isGlobal = 0; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 52c904b1ce..95f42db431 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -47,6 +47,7 @@ call FUNC(determineZoom); ["SettingsInitialized", { // Start Blue Force Tracking if Enabled if (GVAR(BFT_Enabled)) then { + diag_log text "[ACE] Blue Force Tracking Enabled (client)"; GVAR(BFT_markers) = []; [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index bab776c9ab..33049c38ca 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -12,15 +12,12 @@ #include "script_component.hpp" -if !(hasInterface) exitWith {}; +if (!isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); - -if !(_activated) exitWith {}; +PARAMS_1(_logic); [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Blue Force Tracking Module initialized."; -TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); +diag_log text "[ACE]: Blue Force Tracking Module initialized. (server)"; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index aad69ee2fa..a4e5525276 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -112,7 +112,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW }; 0.89; }; - 0.89; + _damageReturn min 0.89; }; if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith { diff --git a/mod.cpp b/mod.cpp index be7d499c7b..0f16ca182a 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.2.0"; +name = "Advanced Combat Environment 3.2.1"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.2.0"; +description = "ACE3 - Version 3.2.1"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3";