BIS_fnc_gridToPos

This commit is contained in:
PabstMirror 2015-03-09 16:09:00 -05:00
parent 0fd49d179d
commit ce5595e107
3 changed files with 10 additions and 2 deletions

View File

@ -35,7 +35,9 @@ _editText = ctrlText (_display displayCtrl IDC_MODEMARK_CORDSEDIT);
switch (_keypadButton) do {
case ("ok"): {
if ((count GVAR(newWaypointPosition)) == 0) then {
_actualPos = [9000,9000,0];
_gridPosTuple = [_editText] call BIS_fnc_gridToPos;
_actualPos = [(((_gridPosTuple select 0) select 0) + 0.5 * ((_gridPosTuple select 1) select 0)), (((_gridPosTuple select 0) select 1) + 0.5 * ((_gridPosTuple select 1) select 1))];
_actualPos set [2, (getTerrainHeightASL _actualPos)];
GVAR(newWaypointPosition) = _actualPos;
[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode);
} else {

View File

@ -17,4 +17,10 @@
*/
#include "script_component.hpp"
PARAMS_1(_showType);
if (_show == DISPLAY_MODE_CLOSED) exitWith {true};
if (_show == DISPLAY_MODE_HIDDEN) exitWith {true};
true

View File

@ -34,7 +34,7 @@ disableSerialization;
//On first-startup
if (GVAR(currentApplicationPage) == APP_MODE_NULL) then {
GVAR(currentApplicationPage) = APP_MODE_INFO;
GVAR(currentApplicationPage) = APP_MODE_INFODISPLAY;
GVAR(mapPosition) = getPos ace_player;
};