From ca2a16af0264bbaad41c100425ea64b8adaec1ac Mon Sep 17 00:00:00 2001
From: Glowbal
Date: Thu, 30 Jul 2015 18:21:24 +0200
Subject: [PATCH 01/12] fix #1946
---
addons/medical/functions/fnc_handleDamage.sqf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 {
From 822115214f71d3945db54d91be873f5fceba35f7 Mon Sep 17 00:00:00 2001
From: PabstMirror
Date: Fri, 31 Jul 2015 03:06:27 -0500
Subject: [PATCH 02/12] Laser - Handle Bad Data Returns
---
.../functions/fnc_seekerFindLaserSpot.sqf | 36 ++++++++++---------
1 file changed, 19 insertions(+), 17 deletions(-)
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;
From 1d82a3c193b57238d39babdf42798aa6076fb4e3 Mon Sep 17 00:00:00 2001
From: PabstMirror
Date: Fri, 31 Jul 2015 23:39:05 -0500
Subject: [PATCH 03/12] #1962 - Fix Changes in Wind Deflection s in AB
---
addons/advanced_ballistics/functions/fnc_handleFired.sqf | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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];
From 2d051188a7c2493319adcc35f7b8c3df4aad4d81 Mon Sep 17 00:00:00 2001
From: PabstMirror
Date: Sat, 1 Aug 2015 00:01:33 -0500
Subject: [PATCH 04/12] #1957 - Fix BFT Module / Settings (for 3.2.1)
---
addons/map/CfgVehicles.hpp | 5 ++---
addons/map/XEH_postInitClient.sqf | 1 +
addons/map/functions/fnc_blueForceTrackingModule.sqf | 9 +++------
3 files changed, 6 insertions(+), 9 deletions(-)
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)";
From fb34efdd0402e4698ab49c0abbe4e015fcd46bfd Mon Sep 17 00:00:00 2001
From: PabstMirror
Date: Sat, 1 Aug 2015 01:30:54 -0500
Subject: [PATCH 05/12] Cleanup stringtable phrasing
---
addons/finger/stringtable.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml
index bbc308fcd7..6d4f02e923 100644
--- a/addons/finger/stringtable.xml
+++ b/addons/finger/stringtable.xml
@@ -34,7 +34,7 @@
Finger Max Range
- How far away players can finger each other. [default: 4]
+ Max range between players to show the pointing indicator [default: 4 meters]
From 1ad1a4b56183e8b7025003c21e355842273656f5 Mon Sep 17 00:00:00 2001
From: bux578
Date: Sat, 1 Aug 2015 11:49:28 +0200
Subject: [PATCH 06/12] rename fingering to pointing
---
addons/finger/stringtable.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml
index 6d4f02e923..f949a7a480 100644
--- a/addons/finger/stringtable.xml
+++ b/addons/finger/stringtable.xml
@@ -1,8 +1,8 @@
-
+
- Show finger indicator to self
+ Show pointing indicator to self
Отображать пальце-индикатор для показывающего игрока
@@ -10,11 +10,11 @@
Отображать индикатор для показывающего игрока. Эта настройка не влияет на то, будутт ли другие игроки видеть индикатор
- Finger indicator
+ Pointing indicator
Пальце-индикатор
- Color of the finger-pointing indicator circle
+ Color of the pointing indicator circle
Цвет индикатора пальце-указания
@@ -22,16 +22,16 @@
Действие "показать пальцем на"
- 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.
- Finger Settings
+ Pointing Settings
- Finger Pointing Enabled
+ Pointing Enabled
- Finger Max Range
+ Pointing Max Range
Max range between players to show the pointing indicator [default: 4 meters]
From 6ea1b95179ee91f204f3b96eaf86a419cd4b2d71 Mon Sep 17 00:00:00 2001
From: PabstMirror
Date: Tue, 28 Jul 2015 17:26:23 -0500
Subject: [PATCH 07/12] #1939 - Fix Remove Action From Class
---
.../functions/fnc_removeActionFromClass.sqf | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf
index c407273258..3959d7d0b1 100644
--- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf
+++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf
@@ -19,7 +19,7 @@
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
-private ["_res","_varName","_actionTrees", "_actionIndex", "_parentLevel", "_parentNode"];
+private ["_res","_varName","_actionTrees", "_parentNode", "_found"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);
@@ -30,10 +30,15 @@ _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {};
// Iterate through children of the father
+_found = false;
{
if (((_x select 0) select 0) == _actionName) exitWith {
+ TRACE_2("Deleting Action", _forEachIndex, _x);
+ _found = true;
(_parentNode select 1) deleteAt _forEachIndex;
};
} forEach (_parentNode select 1);
-_parentLevel deleteAt _actionIndex;
+if (!_found) then {
+ WARNING("Failed to find action to delete");
+};
From 02cfbeda8ceaf3743f01799eeae1a50b2376b903 Mon Sep 17 00:00:00 2001
From: Glowbal
Date: Sat, 1 Aug 2015 12:10:42 +0200
Subject: [PATCH 08/12] Updated version to 3.2.1
---
README.md | 4 ++--
addons/main/script_mod.hpp | 2 +-
mod.cpp | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 8337f2ef2b..c36945d407 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,10 @@
-
-
+
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/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";
From f6d8625fcbb06deaa4e334e7ff1833df3002cc1a Mon Sep 17 00:00:00 2001
From: SilentSpike
Date: Sat, 1 Aug 2015 12:55:33 +0100
Subject: [PATCH 09/12] Transfer zeus module fixes from master into hotfix
---
addons/zeus/CfgVehicles.hpp | 4 ++++
addons/zeus/functions/fnc_moduleCaptive.sqf | 2 +-
addons/zeus/functions/fnc_moduleSurrender.sqf | 2 +-
addons/zeus/functions/fnc_moduleUnconscious.sqf | 4 ++--
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp
index 79d4ff6f1f..77273c60b7 100644
--- a/addons/zeus/CfgVehicles.hpp
+++ b/addons/zeus/CfgVehicles.hpp
@@ -79,6 +79,10 @@ class CfgVehicles {
class GVAR(moduleBase): Module_F {
author = "SilentSpike";
category = "ACE";
+ functionPriority = 1;
+ isGlobal = 1;
+ isTriggerActivated = 0;
+ scope = 1;
scopeCurator = 2;
};
class GVAR(moduleCaptive): GVAR(moduleBase) {
diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf
index 41d515c2fc..43879a2a59 100644
--- a/addons/zeus/functions/fnc_moduleCaptive.sqf
+++ b/addons/zeus/functions/fnc_moduleCaptive.sqf
@@ -18,7 +18,7 @@
PARAMS_3(_logic,_units,_activated);
private ["_mouseOver","_unit","_captive"];
-if (!_activated) exitWith {};
+if !(_activated && local _logic) exitWith {};
if (isNil QEFUNC(captives,setHandcuffed)) then {
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf
index 8518e2f9ad..30ec8d8d35 100644
--- a/addons/zeus/functions/fnc_moduleSurrender.sqf
+++ b/addons/zeus/functions/fnc_moduleSurrender.sqf
@@ -18,7 +18,7 @@
PARAMS_3(_logic,_units,_activated);
private ["_mouseOver","_unit","_surrendering"];
-if (!_activated) exitWith {};
+if !(_activated && local _logic) exitWith {};
if (isNil QEFUNC(captives,setSurrendered)) then {
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf
index 529c8389ee..401fef2aa4 100644
--- a/addons/zeus/functions/fnc_moduleUnconscious.sqf
+++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf
@@ -18,7 +18,7 @@
PARAMS_3(_logic,_units,_activated);
private ["_mouseOver","_unit","_conscious"];
-if (!_activated) exitWith {};
+if !(_activated && local _logic) exitWith {};
if (isNil QEFUNC(medical,setUnconscious)) then {
[LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);
@@ -38,7 +38,7 @@ if (isNil QEFUNC(medical,setUnconscious)) then {
} else {
_conscious = GETVAR(_unit,ACE_isUnconscious,false);
// Function handles locality for me
- [_unit, !_conscious, round(random(10)+5), true] call EFUNC(medical,setUnconscious);
+ [_unit, !_conscious, 10e10, true] call EFUNC(medical,setUnconscious);
};
};
};
From 876a039e369e049ae10ec7cb94eaf248504224a1 Mon Sep 17 00:00:00 2001
From: ViperMaul
Date: Sat, 1 Aug 2015 18:01:35 -0700
Subject: [PATCH 10/12] Disable headbugfix for
Handcuffed/Surrender,unconscious,water surface and log the situation locally
and on server.
---
addons/common/XEH_postInit.sqf | 7 ++++++
addons/common/functions/fnc_headBugFix.sqf | 29 ++++++++++++++--------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf
index 8b8b3a9005..832f2d695c 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..1126cd0b12 100644
--- a/addons/common/functions/fnc_headBugFix.sqf
+++ b/addons/common/functions/fnc_headBugFix.sqf
@@ -10,21 +10,28 @@
#include "script_component.hpp"
private ["_pos","_dir","_anim"];
-if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {};
+
+_anim = animationState ACE_player;
+["HeadbugFixUsed", [profileName, (animationState ACE_player)]] call FUNC(serverEvent);
+["HeadbugFixUsed", [profileName, (animationState ACE_player)]] 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"];
-_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 = createVehicle ["ACE_Headbug_Fix", getposATL ACE_player, [], 0, "NONE"];
_ACE_HeadbugFix setDir _dir;
-player moveInAny _ACE_HeadbugFix;
+ACE_player moveInAny _ACE_HeadbugFix;
sleep 1.0;
-unassignVehicle player;
-player action ["Eject", vehicle player];
+unassignVehicle ACE_player;
+ACE_player action ["Eject", vehicle ACE_player];
sleep 1.0;
deleteVehicle _ACE_HeadbugFix;
-player setposATL _pos;
-player setDir _dir;
+ACE_player setposATL _pos;
+ACE_player setDir _dir;
titleCut ["", "PLAIN"];
-
+true
From 59a3e62d69117f09f2ffb8b71f5bfb4d62391ed3 Mon Sep 17 00:00:00 2001
From: ViperMaul
Date: Sun, 2 Aug 2015 10:44:49 -0700
Subject: [PATCH 11/12] Attempt to improve the immersion of the magic
---
addons/common/functions/fnc_headBugFix.sqf | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf
index 1126cd0b12..0d2860f3b0 100644
--- a/addons/common/functions/fnc_headBugFix.sqf
+++ b/addons/common/functions/fnc_headBugFix.sqf
@@ -23,15 +23,17 @@ _dir = getDir ACE_player;
titleCut ["", "BLACK"];
// create invisible headbug fix vehicle
-_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL ACE_player, [], 0, "NONE"];
+_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", [0,0,10000], [], 0, "NONE"];
_ACE_HeadbugFix setDir _dir;
ACE_player moveInAny _ACE_HeadbugFix;
-sleep 1.0;
+_ACE_HeadbugFix setposATL _pos;
+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 setposATL _pos;
-ACE_player setDir _dir;
+
titleCut ["", "PLAIN"];
true
From 8ac98ed950aca7b67311fe14b843db68122f8380 Mon Sep 17 00:00:00 2001
From: ViperMaul
Date: Tue, 4 Aug 2015 07:43:42 -0700
Subject: [PATCH 12/12] Better immersion through using hideUnit
---
addons/common/functions/fnc_headBugFix.sqf | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf
index 0d2860f3b0..fe9354f632 100644
--- a/addons/common/functions/fnc_headBugFix.sqf
+++ b/addons/common/functions/fnc_headBugFix.sqf
@@ -12,8 +12,8 @@
private ["_pos","_dir","_anim"];
_anim = animationState ACE_player;
-["HeadbugFixUsed", [profileName, (animationState ACE_player)]] call FUNC(serverEvent);
-["HeadbugFixUsed", [profileName, (animationState ACE_player)]] call FUNC(localEvent);
+["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};
@@ -21,19 +21,22 @@ _pos = getposATL ACE_player;
_dir = getDir ACE_player;
titleCut ["", "BLACK"];
+[ACE_Player, "headBugFix"] call FUNC(hideUnit);
// create invisible headbug fix vehicle
-_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", [0,0,10000], [], 0, "NONE"];
+_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos;
_ACE_HeadbugFix setDir _dir;
ACE_player moveInAny _ACE_HeadbugFix;
-_ACE_HeadbugFix setposATL _pos;
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