mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 23:03:29 +00:00
refactored location handler functions, ARMA HAS A TERRIBLE WAY TO HANDLE ARRAY AS VARIABLES
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// function description: Receives a player's unit as param and return the information array needed to send the HTTP request
|
||||
|
||||
params["_unit"];
|
||||
private _location = [_unit] call armatak_fnc_convert_location;
|
||||
private _location = (getPos _unit) call armatak_fnc_convert_location;
|
||||
|
||||
private _atak_uid = [_unit] call armatak_fnc_extract_uuid;
|
||||
private _atak_latitude = _location select 0;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
params["_unit"];
|
||||
params["_latitude", "_longitude", "_altitude"];
|
||||
|
||||
_location = null;
|
||||
_position = [_latitude, _longitude, _altitude];
|
||||
|
||||
_realLocation = null;
|
||||
|
||||
switch (worldName) do {
|
||||
case "Altis": {
|
||||
_location = [_unit] call armatak_fnc_convert_to_altis;
|
||||
_realLocation = _position call armatak_fnc_convert_to_altis;
|
||||
};
|
||||
default {};
|
||||
};
|
||||
|
||||
_location
|
||||
_realLocation
|
||||
@@ -1,6 +1,6 @@
|
||||
params["_unit"];
|
||||
params["_latitude", "_longitude", "_altitude"];
|
||||
|
||||
_playerPosition = getPos _unit;
|
||||
_playerPosition = [_latitude, _longitude, _altitude];
|
||||
|
||||
_playerLatitude = _playerPosition select 0;
|
||||
_playerLongitude = _playerPosition select 1;
|
||||
|
||||
Reference in New Issue
Block a user