Fix Zeus teleport players module (#5175)

* Add dummy function to zeus UI modules

This removes the message about the module having no function when in SP.

* 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.
This commit is contained in:
SilentSpike 2017-05-26 16:07:33 +01:00 committed by GitHub
parent 772ca1313e
commit 2ca3716277
5 changed files with 18 additions and 2 deletions

View File

@ -37,6 +37,7 @@ PREP(displayTextPicture);
PREP(displayTextStructured);
PREP(doAnimation);
PREP(doGesture);
PREP(dummy);
PREP(dropBackpack);
PREP(endRadioTransmission);
PREP(eraseCache);

View File

@ -0,0 +1,12 @@
/*
* Author: SilentSpike
* A dummy function which does nothing. Can be useful.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public: No
*/

View File

@ -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;

View File

@ -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;

View File

@ -36,9 +36,10 @@ if (_group) then {
private _attached = attachedTo _logic;
if (isNull _attached) then {
[_x, _logic] call BIS_fnc_moveToRespawnPosition;
// Function takes position AGL and must be ran where local
[QGVAR(moveToRespawnPosition), [_x, _logic modelToWorld [0,0,0]], _x] call CBA_fnc_targetEvent;
} else {
[_x, _attached] call BIS_fnc_moveToRespawnPosition;
[QGVAR(moveToRespawnPosition), [_x, _attached], _x] call CBA_fnc_targetEvent;
};
} forEach _player;