mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
24 lines
523 B
Plaintext
24 lines
523 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Returns magnetic heading (0..360)
|
|
*
|
|
* Arguments:
|
|
* 0: Object or Bearing <OBJECT><NUMBER>
|
|
*
|
|
* Return Value:
|
|
* Compass Bearing <NUMBER>
|
|
*
|
|
* Example:
|
|
* [player] call ace_common_fnc_getMagneticBearing
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_source", ace_player, [objNull, 0]]];
|
|
|
|
[
|
|
(if (_source isEqualType 0) then { _source } else { getDir _source })
|
|
+ (missionNamespace getVariable [QGVAR(magneticDeclinationOffset), 0])
|
|
] call CBA_fnc_simplifyAngle;
|