Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Zeus teleport players module #5175

Merged
merged 4 commits into from
May 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/common/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PREP(displayTextPicture);
PREP(displayTextStructured);
PREP(doAnimation);
PREP(doGesture);
PREP(dummy);
PREP(dropBackpack);
PREP(endRadioTransmission);
PREP(eraseCache);
Expand Down
12 changes: 12 additions & 0 deletions addons/common/functions/fnc_dummy.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Author: SilentSpike
* A dummy function which does nothing. Can be useful.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public: No
*/
1 change: 1 addition & 0 deletions addons/zeus/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions addons/zeus/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions addons/zeus/functions/fnc_moduleTeleportPlayers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down