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 setting direction of remote units via zeus #816

Merged
merged 2 commits into from
Dec 8, 2017
Merged
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
18 changes: 18 additions & 0 deletions addons/common/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,22 @@ GVAR(addons) = _addons;
// BWC
#include "backwards_comp.sqf"

// fix changing direction of remote units not working with zeus
["ModuleCurator_F", "init", {
params ["_logic"];

_logic addEventHandler ["CuratorObjectEdited", {
params ["", "_unit"];

if (!local _unit) then {
private _dir = getDir _unit;
[_unit, _dir] remoteExec ["setDir", _unit];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With doWatch you can also let tanks turn the gun. Would be nice to have ;D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The turret is rotating fine with this fix without having to do doWatch.


if (_unit == formLeader _unit) then {
[_unit, _dir] remoteExec ["setFormDir", _unit];
};
};
}];
}] call CBA_fnc_addClassEventHandler;

ADDON = true;