Skip to content

Commit

Permalink
improve Rotate module handling of attached objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ampersand38 committed Oct 11, 2023
1 parent b4d6894 commit 9dfd0aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions addons/modules/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,7 @@ if (isServer) then {
}, _this] call CBA_fnc_execNextFrame;
}] call CBA_fnc_addEventHandler;

[QGVAR(setRotation), {
params ["_object", "_pitch", "_roll", "_yaw"];

_object setDir _yaw;
[_object, _pitch, _roll] call BIS_fnc_setPitchBank;
}] call CBA_fnc_addEventHandler;
[QGVAR(setRotation), BIS_fnc_setObjectRotation] call CBA_fnc_addEventHandler;

[QGVAR(moveToGunner), {
params ["_unit", "_vehicle"];
Expand Down
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleRotateObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ private _yaw = [getDir _object] call CBA_fnc_simplifyAngle180;
params ["_values", "_object"];
_values params ["_pitch", "_roll", "_yaw"];

[QGVAR(setRotation), [_object, _pitch, _roll, _yaw], _object] call CBA_fnc_targetEvent;
[QGVAR(setRotation), [_object, [_yaw, _pitch, _roll]], _object] call CBA_fnc_targetEvent;
}, {}, _object] call EFUNC(dialog,create);

0 comments on commit 9dfd0aa

Please sign in to comment.