From 98a3e98a18603f161806f7148d63ef9982b93e26 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 18 May 2017 20:18:12 +0100 Subject: [PATCH 1/4] Add dummy function to zeus UI modules This removes the message about the module having no function when in SP. --- addons/common/XEH_PREP.hpp | 1 + addons/common/functions/fnc_dummy.sqf | 12 ++++++++++++ addons/zeus/CfgVehicles.hpp | 1 + 3 files changed, 14 insertions(+) create mode 100644 addons/common/functions/fnc_dummy.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index b4e5f269862..5720d31873d 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -37,6 +37,7 @@ PREP(displayTextPicture); PREP(displayTextStructured); PREP(doAnimation); PREP(doGesture); +PREP(dummy); PREP(dropBackpack); PREP(endRadioTransmission); PREP(eraseCache); diff --git a/addons/common/functions/fnc_dummy.sqf b/addons/common/functions/fnc_dummy.sqf new file mode 100644 index 00000000000..a70fed35c00 --- /dev/null +++ b/addons/common/functions/fnc_dummy.sqf @@ -0,0 +1,12 @@ +/* + * Author: SilentSpike + * A dummy function which does nothing. Can be useful. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 42dc6d42890..0965166db44 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -86,6 +86,7 @@ class CfgVehicles { class GVAR(moduleBase): Module_F { author = ECSTRING(common,ACETeam); category = "ACE"; + function = QEFUNC(common,dummy); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; From 176dbcf5a556690b20ef9bd78c24d7536fff5850 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 18 May 2017 20:25:30 +0100 Subject: [PATCH 2/4] Fix zeus teleport module for non-local units BI made a change to the function this module was using. So now it has to be ran local to the player in question. --- addons/zeus/XEH_postInit.sqf | 1 + addons/zeus/functions/fnc_moduleTeleportPlayers.sqf | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index 0c3ff85cdf8..adf3d75a9bf 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -10,6 +10,7 @@ // Global skill module PVs values for persistence, just listen for the PV QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); +[QGVAR(moveToRespawnPosition), BIS_fnc_moveToRespawnPosition] call CBA_fnc_addEventHandler; [QGVAR(moduleDefendArea), CBA_fnc_taskDefend] call CBA_fnc_addEventHandler; [QGVAR(modulePatrolArea), CBA_fnc_taskPatrol] call CBA_fnc_addEventHandler; [QGVAR(moduleSearchNearby), CBA_fnc_searchNearby] call CBA_fnc_addEventHandler; diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index 4a1855ba65f..2a67cbce036 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -34,11 +34,12 @@ if (_group) then { { moveOut _x; + // Must be ran where local private _attached = attachedTo _logic; if (isNull _attached) then { - [_x, _logic] call BIS_fnc_moveToRespawnPosition; + [QGVAR(moveToRespawnPosition), [_x, _logic], _x] call CBA_fnc_targetEvent; } else { - [_x, _attached] call BIS_fnc_moveToRespawnPosition; + [QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent; }; } forEach _player; From f3a679bb558193609db9dc5c0a315fcf5ed94ec9 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 18 May 2017 20:46:15 +0100 Subject: [PATCH 3/4] Account for logic deletion --- addons/zeus/functions/fnc_moduleTeleportPlayers.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index 2a67cbce036..eb93a8e26f1 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -37,7 +37,7 @@ if (_group) then { // Must be ran where local private _attached = attachedTo _logic; if (isNull _attached) then { - [QGVAR(moveToRespawnPosition), [_x, _logic], _x] call CBA_fnc_targetEvent; + [QGVAR(moveToRespawnPosition), [_x, getPos _logic], _x] call CBA_fnc_targetEvent; } else { [QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent; }; From b7a093581f4370a99a6cab4b57dbc0d900a0d560 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Thu, 18 May 2017 20:55:46 +0100 Subject: [PATCH 4/4] Fix incorrect position format --- addons/zeus/functions/fnc_moduleTeleportPlayers.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index eb93a8e26f1..c52517a7d0a 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -34,10 +34,10 @@ if (_group) then { { moveOut _x; - // Must be ran where local private _attached = attachedTo _logic; if (isNull _attached) then { - [QGVAR(moveToRespawnPosition), [_x, getPos _logic], _x] call CBA_fnc_targetEvent; + // Function takes position AGL and must be ran where local + [QGVAR(moveToRespawnPosition), [_x, _logic modelToWorld [0,0,0]], _x] call CBA_fnc_targetEvent; } else { [QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent; };