ACE3/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf

31 lines
663 B
Plaintext
Raw Normal View History

2015-03-09 15:46:59 +00:00
/*
* Author: PabstMirror
2015-03-11 07:06:07 +00:00
* Handles the double tapping either of the 2 mini-maps
2015-03-09 15:46:59 +00:00
*
* Arguments:
2015-03-11 07:06:07 +00:00
* 0: The Map <CONTROL>
* 1: MouseButton <NUMBER>
* 2: MousePosX <NUMBER>
* 3: MousePosY <NUMBER>
2015-03-09 15:46:59 +00:00
*
* Return Value:
2015-03-11 07:06:07 +00:00
* Nothing
2015-03-09 15:46:59 +00:00
*
* Example:
* [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapDoubleTapEH
2015-03-09 15:46:59 +00:00
*
2015-03-11 07:06:07 +00:00
* Public: No
2015-03-09 15:46:59 +00:00
*/
#include "script_component.hpp"
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
2015-03-11 07:06:07 +00:00
//Only handle LMB
2015-03-09 15:46:59 +00:00
if (_mouseButton != 0) exitWith {};
_worldPos = _theMap ctrlMapScreenToWorld [_xPos, _yPos];
_worldPos set [2, (getTerrainHeightASL _worldPos)];
GVAR(newWaypointPosition) = _worldPos;
[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode);