Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modelToWorldVisualWorld #8489

Merged
merged 2 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_drawThrowable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered

private _posCameraWorld = AGLToASL (positionCameraToWorld [0, 0, 0]);
_posHeadRel = _posHeadRel vectorAdd [-0.03, 0.01, 0.15]; // Bring closer to eyePos value
private _posFin = AGLToASL (ACE_player modelToWorldVisual _posHeadRel);
private _posFin = ACE_player modelToWorldVisualWorld _posHeadRel;

private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];

Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_throw.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
_velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode;

private _p2 = (eyePos _unit) vectorAdd (AGLToASL (positionCameraToWorld _direction)) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0]));
private _p1 = AGLtoASL (_activeThrowable modelToWorldVisual [0, 0, 0]);
private _p1 = _activeThrowable modelToWorldVisualWorld [0, 0, 0];

private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity;

Expand Down
2 changes: 1 addition & 1 deletion addons/backpacks/functions/fnc_backpackOpened.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private _sounds = [
QUOTE(PATHTO_R(sounds\zip_out.wav))
];

private _position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3"));
private _position = _target modelToWorldVisualWorld (_target selectionPosition "Spine3");

playSound3D [
selectRandom _sounds,
Expand Down
8 changes: 4 additions & 4 deletions addons/common/functions/fnc_getTurretDirection.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ private _gunEnd = getText (_turret >> "gunEnd");
TRACE_3("", _pov, _gunBeg, _gunEnd);

// Pull the PIP pov or barrel direction, depending on how the model is set up
private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

old func: boat on the water it gave turret postASL as [1574.31,3870.15,-14.5889]
so great fix, but doesn't look like anything uses this func

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like CBA also has a much more intricate turretDir; though that is not used anywhere in ACE3 either.

private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov);
private _povDir = [0,0,0];

if (_pov == "pip0_pos") then {
private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir"));
private _pipDir = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition "pip0_dir");

_povDir = _pipDir vectorDiff _povPos;
} else {
private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg));
private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd));
private _gunBeginPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _gunBeg);
private _gunEndPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _gunEnd);

_povDir = _gunBeginPos vectorDiff _gunEndPos;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/dogtags/functions/fnc_checkDogtag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["_player", "_target"];
_player call EFUNC(common,goKneeling);

// sound
private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck"));
private _position = _target modelToWorldWorld (_target selectionPosition "neck");

playSound3D [
selectRandom RUSTLING_SOUNDS,
Expand Down
2 changes: 1 addition & 1 deletion addons/dogtags/functions/fnc_takeDogtag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params ["_player", "_target"];
_player call EFUNC(common,goKneeling);

// sound
private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck"));
private _position = _target modelToWorldWorld (_target selectionPosition "neck");

playSound3D [
selectRandom RUSTLING_SOUNDS,
Expand Down
2 changes: 1 addition & 1 deletion addons/dragon/functions/fnc_attackProfile_DRAGON.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut || { !alive _shoote
// wire snap, random direction
if (!_wireCut) then {
_attackProfileStateParams set [1, true];
playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 5, 1, 25];
playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, _shooter modelToWorldWorld _wireCutSource, 5, 1, 25];
};

if (_serviceChargeCount > 0 && {(_lastTime - CBA_missionTime) <= 0}) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_findReflections.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if (_zIndex < 5) then {
if (count _explosions > (_radi * 2) / _depth) exitWith {};
} forEach _buckets;
// _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos);
// _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
// _dirvec = _pos vectorFromTo ((player modelToWorldVisualWorld (player selectionPosition "Spine3")));
// _dirvec = _dirvec vectorMultiply 100;
// _can setVelocity _dirvec;
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};

// systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime];
{
private _helperPos = AGLtoASL (_houseBeingScaned modelToWorld (_houseBeingScaned selectionPosition _x));
private _helperPos = _houseBeingScaned modelToWorldWorld (_houseBeingScaned selectionPosition _x);
private _helperObject = "ACE_LogicDummy" createVehicleLocal [0,0,0];
_addedHelpers pushBack _helperObject;
_helperObject setVariable [QGVAR(building), _houseBeingScaned];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (!((_target isKindOf "Car") || {_target isKindOf "Tank"} || {_target isKindOf

private _unitEyeASL = eyePos _unit;
private _targetModelPos = [_target, _unitEyeASL] call FUNC(getVehiclePosComplex);
private _distance = _unitEyeASL distance (AGLtoASL (_target modelToWorld _targetModelPos));
private _distance = _unitEyeASL distance (_target modelToWorldWorld _targetModelPos);

TRACE_2("",_targetModelPos,_distance);

Expand Down
2 changes: 1 addition & 1 deletion addons/interaction/functions/fnc_getVehiclePos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (cursorObject isEqualTo _target) exitWith {
private _dest = EGVAR(interact_menu,cameraPosASL) vectorAdd (EGVAR(interact_menu,cameraDir) vectorMultiply 50);
private _origin = EGVAR(interact_menu,cameraPosASL);
//private _origin = EGVAR(interact_menu,cameraPosASL) vectorAdd [0, 0, -0.35] vectorDiff (EGVAR(interact_menu,cameraDir) vectorMultiply 1.5);
//private _dest = AGLtoASL (_target modelToWorldVisual [0,0,0]);
//private _dest = _target modelToWorldVisualWorld [0,0,0];
private _results = lineIntersectsSurfaces [_origin, _dest, ACE_player, objNull, true, 5];
private _finalPos = [0,0,0];
{
Expand Down
2 changes: 1 addition & 1 deletion addons/interaction/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
#define IDC_MOUSEHINT_EXTRA_NAME 2510
#define IDC_MOUSEHINT_EXTRA_TEXT 2520

#define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance AGLToASL (ACE_player modelToWorld (ACE_player selectionPosition "Head"))) + 2
#define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance ACE_player modelToWorldWorld (ACE_player selectionPosition "Head")) + 2

#define DISABLED_LAMP_DAMAGE 0.95
2 changes: 1 addition & 1 deletion addons/javelin/functions/fnc_getTarget.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!isNull _lastTarget) then {
for "_xOffset" from -2.5 to 2.5 step 0.5 do {
for "_yOffset" from -2 to 1 step 0.5 do {
// Find test points in the model based on the angle that we are viewing it from (not true 3d projection, but not bad)
private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]);
private _testPosASL = _lastTarget modelToWorldWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset];
private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1];
// drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"];
if (_intersectionsToCursorTarget isNotEqualTo []) then {
Expand Down
4 changes: 2 additions & 2 deletions addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

// Try searching for lasers from a given vehicle position [BLUE]:
private _seekerVehicle = vehicle ace_player;
private _testSeekerPosASL = AGLtoASL (_seekerVehicle modelToWorldVisual [0,0,1]);
private _testSeekerPosASL = _seekerVehicle modelToWorldVisualWorld [0,0,1];
private _testSeekerDir = vectorDirVisual _seekerVehicle;
{
private _code = _x;
Expand Down Expand Up @@ -67,7 +67,7 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle;
// Draw array weapon lasers [YELLOW]
if ((_laserMethod isEqualType []) && {(count _laserMethod) == 2}) then {
_laserMethod params ["_modelPosition", "_weaponName"];
private _laserPosASL = AGLtoASL (_obj modelToWorldVisual _modelPosition);
private _laserPosASL = _obj modelToWorldVisualWorld _modelPosition;
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"];
private _laserDir = _obj weaponDirection _weaponName;
private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay);
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_findLaserSource.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (surfaceIsWater _targetPos && {(_targetPos select 2) < 0}) then {
_targetPos set [2, 0.25];
};

private _povPos = AGLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _ownerSelection));
private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _ownerSelection);
private _povDir = _povPos vectorFromTo _targetPos;

TRACE_4("",_vehicle,_targetObject,_povPos,_povDir);
Expand Down
4 changes: 2 additions & 2 deletions addons/laser/functions/fnc_seekerFindLaserSpot.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ private _finalOwner = objNull;

if (IS_ARRAY(_laserMethod)) then {
if (count _laserMethod == 2) then { // [modelPosition, weaponName] for _obj
_laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), _obj weaponDirection (_laserMethod select 1)];
_laser = [_obj modelToWorldVisualWorld (_laserMethod select 0), _obj weaponDirection (_laserMethod select 1)];
} else {
if (count _laserMethod == 3) then {
_laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 1))) vectorFromTo (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 2)))];
_laser = [_obj modelToWorldVisualWorld (_laserMethod select 0), (_obj modelToWorldVisualWorld (_laserMethod select 1)) vectorFromTo (_obj modelToWorldVisualWorld (_laserMethod select 2))];
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/laser/functions/fnc_showVehicleHud.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GVAR(pfID) = [{

// Do Laser Scan:
private _ammo = getText (configFile >> "CfgMagazines" >> _vehicle currentMagazineTurret _turretPath >> "ammo");
private _laserSource = AGLtoASL (_vehicle modelToWorld (_vehicle selectionPosition _seekerSource));
private _laserSource = _vehicle modelToWorldWorld (_vehicle selectionPosition _seekerSource);
private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _seekerAngle = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerAngle");
private _seekerMaxRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerMaxRange");
Expand Down
2 changes: 1 addition & 1 deletion addons/laserpointer/functions/fnc_drawLaserpoint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["_target", "_range", "_isGreen", "_brightness"];

private _unit = ACE_player;

private _p0 = AGLToASL (_target modelToWorldVisual (_target selectionPosition "righthand"));
private _p0 = _target modelToWorldVisualWorld (_target selectionPosition "righthand");

// Find a system of orthogonal reference vectors
// _v1 points in the direction of the weapon
Expand Down
4 changes: 2 additions & 2 deletions addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ TRACE_1("Starting wirecuter interact PFH",_interactionType);
&& {[_player, _attachedFence, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
&& {
// Custom LOS check for fence
private _headPos = AGLtoASL (_player modelToWorldVisual (_player selectionPosition "pilot"));
!lineIntersects [_headPos, AGLtoASL (_helper modelToWorldVisual [0, 0, 1.25]), _attachedFence, _player]
private _headPos = _player modelToWorldVisualWorld (_player selectionPosition "pilot");
!lineIntersects [_headPos, _helper modelToWorldVisualWorld [0, 0, 1.25], _attachedFence, _player]
|| {!lineIntersects [_headPos, getPosASL _attachedFence, _attachedFence, _player]}
}
};
Expand Down
2 changes: 1 addition & 1 deletion addons/minedetector/functions/fnc_playDetectorSound.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ if (!alive _unit) exitWith {
if (_unit getVariable [QGVAR(isUsingHeadphones), false] && {_unit == ACE_player}) then {
playSound _soundClass;
} else {
private _posASL = AGLtoASL (_unit modelToWorld (_unit selectionPosition "granat"));
private _posASL = _unit modelToWorldWorld (_unit selectionPosition "granat");
[_soundClass, _posASL, 3, 15] call EFUNC(common,playConfigSound3D);
};
2 changes: 1 addition & 1 deletion addons/quickmount/functions/fnc_getInNearest.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!GVAR(enabled) ||
params [["_interactionTarget", objNull, [objNull]]];
TRACE_1("getInNearest",_interactionTarget);

private _start = AGLtoASL (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
private _start = ACE_player modelToWorldVisualWorld (ACE_player selectionPosition "pilot");
private _end = (_start vectorAdd (getCameraViewDirection ACE_player vectorMultiply GVAR(distance)));
private _objects = lineIntersectsSurfaces [_start, _end, ACE_player];
private _target = (_objects param [0, []]) param [2, objNull];
Expand Down
8 changes: 4 additions & 4 deletions addons/refuel/functions/fnc_connectNozzleAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_startin
private _bestPosASL = [];
private _bestPosDistance = 1e99;
private _viewPos = _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,0,1])) vectorMultiply 3);
private _modelVector = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToWorld [0,0,0]));
private _modelVectorLow = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToWorld [0,0,-1]));
private _modelVector = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,0]);
private _modelVectorLow = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,-1]);

{
private _endPosASL = _x;
Expand All @@ -50,8 +50,8 @@ private _modelVectorLow = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToW
_startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,-0.25,1])) vectorMultiply 3),
_startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [-0.25,-0.25,1])) vectorMultiply 3),
_startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0.25,-0.25,1])) vectorMultiply 3),
AGLtoASL (_sink modelToWorld [0,0,0]), // Try old method of just using model center
AGLtoASL (_sink modelToWorld [0,0,-0.5])
_sink modelToWorldWorld [0,0,0], // Try old method of just using model center
_sink modelToWorldWorld [0,0,-0.5]
];

//Checks (too close to center or can't attach)
Expand Down
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_repair.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
};
};

private _soundPosition = AGLToASL (_caller modelToWorldVisual (_caller selectionPosition "RightHand"));
private _soundPosition = _caller modelToWorldVisualWorld (_caller selectionPosition "RightHand");
["Acts_carFixingWheel", _soundPosition, nil, 50] call EFUNC(common,playConfigSound3D);

// Get repair time
Expand Down
2 changes: 1 addition & 1 deletion addons/safemode/functions/fnc_playChangeFiremodeSound.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (_sound isEqualTo []) exitWith {
};

// get position where to play the sound (position of the weapon)
private _position = AGLToASL (_unit modelToWorldVisual (_unit selectionPosition "RightHand"));
private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand");

_sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]];

Expand Down
4 changes: 2 additions & 2 deletions addons/spectator/functions/fnc_cam_prepareTarget.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if !(isNull _focus) then {
private _isMan = _focus isKindOf "Man";
private _height = if !(_isMan) then { (_bbd select 2) / 3 } else { switch (stance _focus) do { case "STAND": {1.4}; case "CROUCH": {0.8}; default {0.4}; }; };

private _center = if (_isMan) then { AGLToASL (_focus modelToWorldVisual (_focus selectionPosition "Spine3")) } else { AGLToASL (_focus modelToWorldVisual [0,0,_height]) };
private _center = if (_isMan) then { _focus modelToWorldVisualWorld (_focus selectionPosition "Spine3") } else { _focus modelToWorldVisualWorld [0,0,_height] };

// Set dummy location and rotation
private _dummy = GVAR(camDummy);
Expand All @@ -49,6 +49,6 @@ if !(isNull _focus) then {
[_dummy, [GVAR(camYaw), GVAR(camPitch), 0]] call BIS_fnc_setObjectRotation;

// Apply location and rotation to camera
GVAR(camera) setPosASL (AGLToASL (_dummy modelToWorldVisual [0, -_distance, 0]));
GVAR(camera) setPosASL (_dummy modelToWorldVisualWorld [0, -_distance, 0]);
GVAR(camera) setVectorDirAndUp [vectorDirVisual _dummy, vectorUpVisual _dummy];
};
2 changes: 1 addition & 1 deletion addons/spottingscope/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PREP_RECOMPILE_END;

private _tube = "ACE_SpottingScope_tube" createVehicle [0,0,0];
_tube setDir (getDir _wreck - 180);
_tube setPosASL AGLToASL (_wreck modelToWorld (_wreck selectionPosition "destructionEffect"));
_tube setPosASL _wreck modelToWorldWorld (_wreck selectionPosition "destructionEffect");
_tube setVelocity [1 - random 2, 1 - random 2, 4];
_tube addTorque (vectorNormalized [1 - random 2, 1 - random 2, 1 - random 2] vectorMultiply 4);
}] call CBA_fnc_addClassEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params ["_unit", "_ladder"];
[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);

private _pos1 = getPosASL _ladder;
private _pos2 = AGLToASL (_ladder modelToWorld (_ladder selectionPosition "check2"));
private _pos2 = _ladder modelToWorldWorld (_ladder selectionPosition "check2");

if (lineIntersects [_pos1, _pos2, _ladder]) exitWith {false};

Expand Down
2 changes: 1 addition & 1 deletion addons/trenches/functions/fnc_continueDiggingTrench.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if(_actualProgress == 0) then {
//Remove grass
{
private _trenchGrassCutter = createVehicle ["Land_ClutterCutter_medium_F", [0, 0, 0], [], 0, "NONE"];
private _cutterPos = AGLToASL (_trench modelToWorld _x);
private _cutterPos = _trench modelToWorldWorld _x;
_cutterPos set [2, getTerrainHeightASL _cutterPos];
_trenchGrassCutter setPosASL _cutterPos;
deleteVehicle _trenchGrassCutter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private _sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFirem
if (_sound isEqualTo []) exitWith {};

// get position where to play the sound (position of the weapon)
private _position = AGLToASL (_unit modelToWorldVisual (_unit selectionPosition "RightHand"));
private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand");

_sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]];

Expand Down