Skip to content

Commit e42bf70

Browse files
committed
Updating sling point settings for CUPS and RHS CH47s
1 parent 7a7e0b2 commit e42bf70

1 file changed

Lines changed: 2 additions & 43 deletions

File tree

addons/SA_AdvancedSlingLoading/functions/fn_advancedSlingLoadingInit.sqf

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ ASL_Rope_Get_Lift_Capability = {
3030

3131
ASL_SLING_LOAD_POINT_CLASS_HEIGHT_OFFSET = [
3232
["All", [-0.05, -0.05, -0.05]],
33-
["CUP_B_CH47F_USA", [-0.05, -2, -0.05]]
33+
["CUP_CH47F_base", [-0.05, -2, -0.05]],
34+
["RHS_CH_47F", [-0.05, -2, -0.05]]
3435
];
3536

3637
ASL_Get_Sling_Load_Points = {
@@ -108,48 +109,6 @@ ASL_Get_Sling_Load_Points = {
108109
_slingLoadPointsArray;
109110
};
110111

111-
/*
112-
ASL_Get_Sling_Load_Points = {
113-
params ["_vehicle"];
114-
private ["_slingLoadPointsArray","_cornerPoints","_rearCenterPoint","_frontToRearUnitVector","_vehicleLength","_vehicleUnitVectorUp","_numberOfSlingsCount","_distanceBetweenSlings"];
115-
private ["_slingLoadPoints","_modelPoint","_modelPointASL","_surfaceIntersectStartASL","_surfaceIntersectEndASL","_surfaces","_intersectionASL","_intersectionObject"];
116-
_slingLoadPointsArray = [];
117-
_cornerPoints = [_vehicle] call ASL_Get_Corner_Points;
118-
_frontCenterPoint = (((_cornerPoints select 2) vectorDiff (_cornerPoints select 3)) vectorMultiply 0.5) vectorAdd (_cornerPoints select 3);
119-
_rearCenterPoint = (((_cornerPoints select 0) vectorDiff (_cornerPoints select 1)) vectorMultiply 0.5) vectorAdd (_cornerPoints select 1);
120-
_frontToRearUnitVector = _frontCenterPoint vectorFromTo _rearCenterPoint;
121-
_vehicleLength = _frontCenterPoint distance _rearCenterPoint;
122-
_vehicleUnitVectorUp = vectorNormalized (vectorUp _vehicle);
123-
_numberOfSlingsCount = 1;
124-
while {_vehicleLength / (_numberOfSlingsCount + 1) >= 3 || _numberOfSlingsCount == 1} do {
125-
_distanceBetweenSlings = _vehicleLength / (_numberOfSlingsCount + 1);
126-
_slingLoadPoints = [];
127-
for "_i" from 1 to _numberOfSlingsCount do {
128-
_modelPoint = _frontCenterPoint vectorAdd (_frontToRearUnitVector vectorMultiply (_distanceBetweenSlings * _i));
129-
_modelPointASL = AGLToASL (_vehicle modelToWorldVisual _modelPoint);
130-
_surfaceIntersectStartASL = _modelPointASL vectorAdd ( _vehicleUnitVectorUp vectorMultiply 5 );
131-
_surfaceIntersectEndASL = _modelPointASL vectorAdd ( _vehicleUnitVectorUp vectorMultiply -5 );
132-
_surfaces = lineIntersectsSurfaces [_surfaceIntersectStartASL, _surfaceIntersectEndASL, objNull, objNull, false, 100];
133-
_intersectionASL = [];
134-
{
135-
_intersectionObject = _x select 2;
136-
if(_intersectionObject == _vehicle) exitWith {
137-
_intersectionASL = _x select 0;
138-
};
139-
} forEach _surfaces;
140-
if(count _intersectionASL == 0) exitWith {};
141-
_slingLoadPoints pushBack (_vehicle worldToModelVisual (ASLToAGL _intersectionASL));
142-
};
143-
if(count _slingLoadPoints == _numberOfSlingsCount) then {
144-
_slingLoadPointsArray pushBack _slingLoadPoints;
145-
};
146-
if(count _slingLoadPoints != _numberOfSlingsCount) exitWith {};
147-
_numberOfSlingsCount = _numberOfSlingsCount + 1;
148-
};
149-
_slingLoadPointsArray;
150-
};
151-
*/
152-
153112
ASL_Rope_Set_Mass = {
154113
private ["_obj","_mass"];
155114
_obj = [_this,0] call BIS_fnc_param;

0 commit comments

Comments
 (0)