mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 21:43:28 +00:00
linted some SQF functions
This commit is contained in:
@@ -24,22 +24,22 @@ if (_activated) exitWith {
|
|||||||
_uid = _x getVariable "_atak_uid";
|
_uid = _x getVariable "_atak_uid";
|
||||||
|
|
||||||
if (_uid == "") then {
|
if (_uid == "") then {
|
||||||
_x call armatak_fnc_postGeoObject;
|
[_x] call armatak_fnc_postGeoObject;
|
||||||
} else {
|
} else {
|
||||||
_x call armatak_fnc_putGeoObject;
|
[_x] call armatak_fnc_putGeoObject;
|
||||||
};
|
};
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
}, 1, []] call CBA_fnc_addPerFrameHandler;
|
||||||
} forEach playableUnits;
|
} forEach playableUnits;
|
||||||
} else {
|
} else {
|
||||||
[{
|
[{
|
||||||
_uid = player getVariable "_atak_uid";
|
_uid = player getVariable "_atak_uid";
|
||||||
|
|
||||||
if (_uid == "") then {
|
if (_uid == "") then {
|
||||||
player call armatak_fnc_postGeoObject;
|
[player] call armatak_fnc_postGeoObject;
|
||||||
} else {
|
} else {
|
||||||
player call armatak_fnc_putGeoObject;
|
[player] call armatak_fnc_putGeoObject;
|
||||||
};
|
};
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
}, 1, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connected!"];
|
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connected!"];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ switch (worldName) do {
|
|||||||
case "Altis": {
|
case "Altis": {
|
||||||
_location = [_unit] call armatak_fnc_convert_to_altis;
|
_location = [_unit] call armatak_fnc_convert_to_altis;
|
||||||
};
|
};
|
||||||
default { };
|
default {};
|
||||||
};
|
};
|
||||||
|
|
||||||
_location
|
_location
|
||||||
@@ -1,24 +1,23 @@
|
|||||||
params["_unit"];
|
params["_unit"];
|
||||||
|
|
||||||
_playerPosition = getPos _unit;
|
_playerPosition = getPos _unit;
|
||||||
|
|
||||||
_playerLatitude = _playerPosition select 0;
|
_playerLatitude = _playerPosition select 0;
|
||||||
_playerLongitude = _playerPosition select 1;
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
_playerMaxLongitude = 30720;
|
_playerMaxLongitude = 30720;
|
||||||
_playerMaxLatitude = 30720;
|
_playerMaxLatitude = 30720;
|
||||||
|
|
||||||
_MapMaxLatitude = 25.481608;
|
_MapMaxLatitude = 25.481608;
|
||||||
_MapMinLatitude = 25.011719;
|
_MapMinLatitude = 25.011719;
|
||||||
|
|
||||||
_MapMaxLongitude = 40.095572;
|
_MapMaxLongitude = 40.095572;
|
||||||
_MapMinLongitude = 39.717094;
|
_MapMinLongitude = 39.717094;
|
||||||
|
|
||||||
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
_RealLongitude = ( _playerLongitude / _playerMaxLongitude ) * _LongitudeDifference + _MapMinLongitude;
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
_RealLatitude = ( _playerLatitude / _playerMaxLatitude ) * _LatitudeDifference + _MapMinLatitude;
|
|
||||||
|
[_RealLongitude, _RealLatitude]
|
||||||
[_RealLongitude,_RealLatitude]
|
|
||||||
Reference in New Issue
Block a user