diff --git a/addons/advanced_fatigue/functions/fnc_renderDebugLines.sqf b/addons/advanced_fatigue/functions/fnc_renderDebugLines.sqf index 3826637b9ea..0bd285c1d43 100644 --- a/addons/advanced_fatigue/functions/fnc_renderDebugLines.sqf +++ b/addons/advanced_fatigue/functions/fnc_renderDebugLines.sqf @@ -19,22 +19,22 @@ addMissionEventHandler ["Draw3D", { private _normal = surfaceNormal (getPosWorld ACE_player); private _beg = (getPosWorld ACE_player) vectorAdd (_normal vectorMultiply 0.5); private _end = _beg vectorAdd (_normal vectorMultiply 2); - drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 1, 0, 1]]; + drawLine3D [ASLToAGL _beg, ASLToAGL _end, [0, 1, 0, 1]]; private _side = vectorNormalized (_normal vectorCrossProduct [0, 0, 1]); private _end = _beg vectorAdd (_side vectorMultiply 2); - drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 0, 1, 1]]; + drawLine3D [ASLToAGL _beg, ASLToAGL _end, [0, 0, 1, 1]]; private _up = vectorNormalized (_normal vectorCrossProduct _side); private _end = _beg vectorAdd (_up vectorMultiply 2); - drawLine3D [ASLToATL _beg, ASLToATL _end, [1, 0, 0, 1]]; + drawLine3D [ASLToAGL _beg, ASLToAGL _end, [1, 0, 0, 1]]; private _movementVector = vectorNormalized (velocity ACE_player); private _end = _beg vectorAdd (_movementVector vectorMultiply 2); - drawLine3D [ASLToATL _beg, ASLToATL _end, [1, 1, 0, 1]]; + drawLine3D [ASLToAGL _beg, ASLToAGL _end, [1, 1, 0, 1]]; private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); _sideVector set [2, 0]; private _end = _beg vectorAdd (_sideVector vectorMultiply 2); - drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 1, 1, 1]]; + drawLine3D [ASLToAGL _beg, ASLToAGL _end, [0, 1, 1, 1]]; }]; diff --git a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf index 8a312d95cc5..d650f3b43f9 100644 --- a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf +++ b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf @@ -25,33 +25,8 @@ private _unitMoveList = missionNamespace getVariable [QGVAR(garrison_unitMoveLis { _x params ["_unit", "_pos"]; - switch (true) do { - case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLToASL _pos), [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; - }; - - case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; - }; - - case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLToASL _pos), 0.75, 0.75, 0.75]; - }; - - case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; - }; + for "_i" from 0 to 3 do { + drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]]; }; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; } forEach _unitMoveList; diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index d54fda78ba8..4f2e3f4fa6b 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -38,7 +38,6 @@ if (!_checkAll) exitWith {}; if (!isServer) then { ["ace_versioning_clientCheckDone", { // Don't let this event get triggered again - //IGNORE_PRIVATE_WARNING ["_thisType", "_thisId", "_thisArgs"]; [_thisType, _thisId] call CBA_fnc_removeEventHandler; params ["_clientErrors"]; diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index 92cedec3b96..d8eac64ca12 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -36,7 +36,7 @@ private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM; private _easting = _UTM select 0; private _northing = _UTM select 1; //private _zone = _UTM select 2; -TRACE_4("",_UTM,_easting,_northing,_zone); +TRACE_3("",_UTM,_easting,_northing); /* private _band = switch (true) do { diff --git a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf index baf1871b9f9..ee6e420858c 100644 --- a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf +++ b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf @@ -16,8 +16,8 @@ * Public: Yes */ -private _position = ATLToASL positionCameraToWorld [0, 0, 0]; -private _direction = ATLToASL positionCameraToWorld [0, 0, 1]; +private _position = AGLToASL positionCameraToWorld [0, 0, 0]; +private _direction = AGLToASL positionCameraToWorld [0, 0, 1]; private _azimuth = ((_direction select 0) - (_position select 0)) atan2 ((_direction select 1) - (_position select 1)); private _inclination = asin ((_direction select 2) - (_position select 2)); diff --git a/addons/common/functions/fnc_getTargetObject.sqf b/addons/common/functions/fnc_getTargetObject.sqf index ab699e1f3d1..5af24c3530f 100644 --- a/addons/common/functions/fnc_getTargetObject.sqf +++ b/addons/common/functions/fnc_getTargetObject.sqf @@ -17,11 +17,9 @@ params ["_maxDistance"]; -private _position = ATLToASL positionCameraToWorld [0, 0, 0]; -_position set [2, (_position select 2) - (getTerrainHeightASL _position min 0)]; +private _position = AGLToASL positionCameraToWorld [0, 0, 0]; -private _laser = ATLToASL positionCameraToWorld [0, 0, _maxDistance]; -_laser set [2, (_laser select 2) - (getTerrainHeightASL _laser min 0)]; +private _laser = AGLToASL positionCameraToWorld [0, 0, _maxDistance]; private _intersects = lineIntersectsObjs [_position, _laser, objNull, objNull, true, 2]; diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index 45020bad84a..b552b7230af 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -52,7 +52,7 @@ if (_reason != "") then { }; private _masks = values GVAR(showHudHash); -private _resultMask = []; //IGNORE_PRIVATE_WARNING ["_resultMask"]; +private _resultMask = []; for "_index" from 0 to 9 do { private _set = true; //Default to true diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 4a80a4819e9..1f91c84a30a 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -20,7 +20,7 @@ if (!hasInterface) exitWith {}; params ["_huntIR"]; GVAR(huntIR) = _huntIR; -GVAR(pos) = getPosVisual GVAR(huntIR); +GVAR(pos) = ASLToAGL getPosASLVisual GVAR(huntIR); GVAR(ZOOM) = 0; GVAR(NV) = 0; diff --git a/addons/map/functions/fnc_initMainMap.sqf b/addons/map/functions/fnc_initMainMap.sqf index 968ba25a851..4c8d3b16a03 100644 --- a/addons/map/functions/fnc_initMainMap.sqf +++ b/addons/map/functions/fnc_initMainMap.sqf @@ -29,6 +29,12 @@ GVAR(mousePos) = [0.5, 0.5]; GVAR(rightMouseButtonLastPos) = []; _control ctrlAddEventHandler ["Draw", {call FUNC(updateMapEffects)}]; +_control ctrlAddEventHandler ["MouseButtonDown", { + params ["", "_button", "_x", "_y"]; + if (_button == 1) then { + GVAR(rightMouseButtonLastPos) = [_x, _y]; + }; +}]; _control ctrlAddEventHandler ["MouseMoving", { params ["_control", "_x", "_y"]; if (GVAR(isShaking) && {count GVAR(rightMouseButtonLastPos) == 2}) then { @@ -41,12 +47,6 @@ _control ctrlAddEventHandler ["MouseMoving", { }; }]; -_control ctrlAddEventHandler ["MouseButtonDown", { - params ["", "_button", "_x", "_y"]; - if (_button == 1) then { - GVAR(rightMouseButtonLastPos) = [_x, _y]; - }; -}]; _control ctrlAddEventHandler ["MouseButtonUp", { params ["", "_button"]; diff --git a/addons/medical/functions/fnc_deserializeState.sqf b/addons/medical/functions/fnc_deserializeState.sqf index 8416599bec5..a9057a42b8e 100644 --- a/addons/medical/functions/fnc_deserializeState.sqf +++ b/addons/medical/functions/fnc_deserializeState.sqf @@ -29,7 +29,6 @@ if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit) }; if !(_unit getVariable [QGVAR(initialized), false]) exitWith { [QEGVAR(medical_status,initialized), { params ["_unit"]; - //IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisId", "_thisType"]; _thisArgs params ["_target"]; if (_unit == _target) then { diff --git a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf index df8c1e92af1..0f04df37876 100644 --- a/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf +++ b/addons/missileguidance/functions/fnc_dev_ProjectileCamera.sqf @@ -13,7 +13,7 @@ */ params ["_projectile"]; -private _camera = "camera" camCreate getPosATL _projectile; +private _camera = "camera" camCreate ASLToAGL getPosASL _projectile; _camera camPrepareFov 0.7; _camera cameraEffect ["internal", "back"]; diff --git a/addons/movement/functions/fnc_canClimb.sqf b/addons/movement/functions/fnc_canClimb.sqf index d197afe4ede..2e8b940f49f 100644 --- a/addons/movement/functions/fnc_canClimb.sqf +++ b/addons/movement/functions/fnc_canClimb.sqf @@ -48,12 +48,12 @@ private _checkPos5end = _checkPos5beg vectorAdd (_dir vectorMultiply 1.3); [_idPFH] call CBA_fnc_removePerFrameHandler; }; - drawLine3D [ASLToATL (_args select 1), ASLToATL (_args select 2), [0,1,0,1]]; - drawLine3D [ASLToATL (_args select 3), ASLToATL (_args select 4), [1,0,0,1]]; - drawLine3D [ASLToATL (_args select 5), ASLToATL (_args select 6), [1,0.5,0.5,1]]; - drawLine3D [ASLToATL (_args select 7), ASLToATL (_args select 8), [1,0.5,0.5,1]]; - drawLine3D [ASLToATL (_args select 9), ASLToATL (_args select 10), [1,0.5,0.5,1]]; - drawLine3D [ASLToATL (_args select 11), ASLToATL (_args select 12), [1,0.5,0.5,1]]; + drawLine3D [ASLToAGL (_args select 1), ASLToAGL (_args select 2), [0,1,0,1]]; + drawLine3D [ASLToAGL (_args select 3), ASLToAGL (_args select 4), [1,0,0,1]]; + drawLine3D [ASLToAGL (_args select 5), ASLToAGL (_args select 6), [1,0.5,0.5,1]]; + drawLine3D [ASLToAGL (_args select 7), ASLToAGL (_args select 8), [1,0.5,0.5,1]]; + drawLine3D [ASLToAGL (_args select 9), ASLToAGL (_args select 10), [1,0.5,0.5,1]]; + drawLine3D [ASLToAGL (_args select 11), ASLToAGL (_args select 12), [1,0.5,0.5,1]]; }, 0, [ diag_tickTime, _checkPos0beg, _checkPos0end, _checkPos1beg, _checkPos1end, diff --git a/addons/spectator/functions/fnc_cam.sqf b/addons/spectator/functions/fnc_cam.sqf index 08a47c0073b..534951f5560 100644 --- a/addons/spectator/functions/fnc_cam.sqf +++ b/addons/spectator/functions/fnc_cam.sqf @@ -83,7 +83,7 @@ if (_init) then { GVAR(camAgentFree) enableSimulation false; // Prevent falling into water // Create dummy target used for follow camera - GVAR(camDummy) = "Logic" createVehicleLocal getPosASLVisual GVAR(camFocus); + GVAR(camDummy) = "Logic" createVehicleLocal ASLToAGL getPosASLVisual GVAR(camFocus); // Handle initial camera mode limitation if !(GVAR(camMode) in GVAR(availableModes)) then { diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 066df4a69f3..15367e62a66 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -126,7 +126,7 @@ if !(GVAR(uiMapVisible)) then { private _grenadeVelocityMagnitude = vectorMagnitude velocity _x; // Draw grenade (rotate icon to represent spinning) - drawIcon3D [ICON_GRENADE, [1,0,0,1], getPosVisual _x, 0.6, 0.6, if (_grenadeVelocityMagnitude > 0) then { time * 100 * _grenadeVelocityMagnitude } else { 0 }, "", 0, 0.05, "TahomaB"]; + drawIcon3D [ICON_GRENADE, [1,0,0,1], ASLToAGL getPosASLVisual _x, 0.6, 0.6, if (_grenadeVelocityMagnitude > 0) then { time * 100 * _grenadeVelocityMagnitude } else { 0 }, "", 0, 0.05, "TahomaB"]; // Store grenade for next frame _grenadesNew pushBack _x; diff --git a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf index 6c73df03e6a..3dfc8f0371a 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf @@ -108,13 +108,13 @@ if (_key == DIK_L) exitWith { deleteVehicle GVAR(camLights); GVAR(camLights) = []; } else { - private _cameraLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); + private _cameraLight = "#lightpoint" createVehicleLocal ASLToAGL getPosASL GVAR(camera); _cameraLight setLightBrightness 2; _cameraLight setLightAmbient [1,1,1]; _cameraLight setLightColor [0,0,0]; _cameraLight lightAttachObject [GVAR(camera), [0,0,0]]; - private _pointerLight = "#lightpoint" createVehicleLocal getPosASL GVAR(camera); + private _pointerLight = "#lightpoint" createVehicleLocal ASLToAGL getPosASL GVAR(camera); _pointerLight setLightBrightness 1; _pointerLight setLightAmbient [1,1,1]; _pointerLight setLightColor [0,0,0]; diff --git a/addons/vector/functions/fnc_getDirection.sqf b/addons/vector/functions/fnc_getDirection.sqf index 5353721bf5e..d1e90e89906 100644 --- a/addons/vector/functions/fnc_getDirection.sqf +++ b/addons/vector/functions/fnc_getDirection.sqf @@ -27,8 +27,8 @@ private _dlgVector = GETUVAR(ACE_dlgVector, displayNull); #define MAX_ABSINCLINATION 45 -private _position = ATLToASL positionCameraToWorld [0,0,0]; -private _direction = ATLToASL positionCameraToWorld [0,0,1]; +private _position = AGLToASL positionCameraToWorld [0,0,0]; +private _direction = AGLToASL positionCameraToWorld [0,0,1]; private _azimuth = ((_direction select 0) - (_position select 0)) atan2 ((_direction select 1) - (_position select 1)); _azimuth = _azimuth call EFUNC(common,getMagneticBearing); diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 89a5ddaaf57..df47820b349 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -71,7 +71,7 @@ if (_activated && local _logic && !isNull curatorCamera) then { _blur ppEffectAdjust [0.03,0.03,0.1,0.1]; _blur ppEffectCommit 1; - _cam = "camera" camCreate getPosATL curatorCamera; + _cam = "camera" camCreate ASLToAGL getPosASL curatorCamera; _cam cameraEffect ["internal","back"]; _cam camPrepareTarget (screenToWorld [0.5,0.5]); _cam camCommitPrepared 0;