ACE3/addons/interact_menu/functions/fnc_updateVecLineMap.sqf
Nicolás Badano 310710b6e2 Major plumbing upgrades on interact_menu:
- Store only one compiled menu per class
- Actions added through apis for invidual objects stored on the object separately
- Replaced the concept of uids by paths. This allows adding/removing actions inside other actions loaded from config seamlessly.
- Temporarily removed caching of nearby actions (probe). We may go back to that if needed pretty easily. This allows the player to move freely with the interaction menu opened.
2015-02-27 01:55:16 -03:00

13 lines
576 B
Plaintext

#include "script_component.hpp";
if((count GVAR(vecLineMap)) == 0 || ((count GVAR(menuDepthPath)) > 0 && (getPosASL player) distance GVAR(lastPos) > 0.01)) then {
GVAR(lastPos) = getPosASL player;
_cursorVec = [_cursorPos2, _cursorPos1] call BIS_fnc_vectorFromXtoY;
_p1 = [0,0,0];
_p2 = +_cursorVec;
_p = (_cursorVec call CBA_fnc_vect2polar);
_v = [(_p select 0), (_p select 1), (_p select 2)+90] call CBA_fnc_polar2vect;
_cp = [_cursorVec, _v] call BIS_fnc_crossProduct;
GVAR(vecLineMap) = [_cp, _p1, _p2] call FUNC(rotateVectLineGetMap);
};