ACE3/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf

31 lines
681 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
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-08-26 03:31:33 +00:00
* None
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
*/
2015-08-26 03:31:33 +00:00
params ["_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 {};
private _worldPos = _theMap ctrlMapScreenToWorld [_xPos, _yPos];
2015-08-26 03:31:33 +00:00
_worldPos pushBack (getTerrainHeightASL _worldPos);
2015-03-09 15:46:59 +00:00
GVAR(newWaypointPosition) = _worldPos;
[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode);