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

Fixed airdrops sink in the ground #6238

Merged
merged 1 commit into from
Apr 10, 2018
Merged

Fixed airdrops sink in the ground #6238

merged 1 commit into from
Apr 10, 2018

Conversation

shukari
Copy link
Contributor

@shukari shukari commented Apr 8, 2018

When merged this pull request will:

@commy2
Copy link
Contributor

commy2 commented Apr 9, 2018

Wouldn't this mean the cargo is stuck inside the parachute model?

@shukari
Copy link
Contributor Author

shukari commented Apr 9, 2018

Yes... look here -> https://youtu.be/IYS29dWDe5s?t=1m20s

But the problem is... the driangle thing is the bottom of the parachute... and because the supply is attached is has no physics so... the parent model must be the bottom...

It now works for every supply box!

@dedmen
Copy link
Contributor

dedmen commented Apr 9, 2018

It no works for every supply box!

How about only doing it for the boxes that actually don't have physx and need this "fix"?

@shukari
Copy link
Contributor Author

shukari commented Apr 9, 2018

The problem is the attachTo to the parachute.... then the supplybox is there but has no collision. So then the parachute then hit the ground and the box is in the ground if it is not attached a littlebit over the bottom of the parachute.

It no works for every supply box!

That was a fail... i mean NOW it works for everything.

Vanilla is doing the same... if you place a supplybox in zeus and then change the height to 100m (with ALT) it will automatic attach a parachute to it with attachTo [0,0,1] ^^

@Cuel
Copy link
Contributor

Cuel commented Apr 9, 2018

Seems logical to attach it above the object instead of under

@kymckay
Copy link
Member

kymckay commented Apr 9, 2018

I can confirm that this is how curator does it (and it works):

case "Object": {
	switch _objectType do {
		case "AmmoBox": {
			//--- Create parachute for vehicles in the air
			if ((position _object select 2) > 20 && alive _object) then {
				_para = createvehicle ["B_Parachute_02_F",_objectPos,[],0,"none"];
				_object attachto [_para,[0,0,1]];
			};
		};
	};
};

@kymckay
Copy link
Member

kymckay commented Apr 9, 2018

Question though, why do we not just create the parachute where the object is? (Instead of at [0,0,0] then moving it)

@kymckay kymckay added this to the 3.12.2 milestone Apr 9, 2018
@kymckay kymckay added the kind/bug-fix Release Notes: **FIXED:** label Apr 9, 2018
@shukari
Copy link
Contributor Author

shukari commented Apr 9, 2018

Question though, why do we not just create the parachute where the object is? (Instead of at [0,0,0] then moving it)

I dont understand what you mean... with this PR it works for all container... do you mean dynamically?

@kymckay
Copy link
Member

kymckay commented Apr 9, 2018

Not specific to this PR, I was just looking at the code we have above these changes:

    private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"];
 
     // cannot use setPos on parachutes without them closing down
     _parachute attachTo [_item, [0,0,0]];
     detach _parachute;
 
     private _velocity = velocity _item;
 
    _item attachTo [_parachute, [0,0,1]];
     _parachute setVelocity _velocity;

@shukari shukari changed the title fix #6237 Fixed airdrops sink in the ground Apr 9, 2018
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

lower straps look a little funny but functionality over form

@PabstMirror PabstMirror merged commit 181d2ef into acemod:master Apr 10, 2018
@Bosenator
Copy link
Contributor

Before this fix, my solution was the following:

if (isServer) then {
	["ace_cargoUnloaded", {
		params ["_item", "_vehicle", ["_type", ""]];

		if (_type == "paradrop") then {
			[_item] spawn {
				params ["_crate"];
				
				if (isNull _crate) exitWith {};				
				waitUntil {(getPosVisual _crate select 2) < 1};
				_groundPosition = getPos _crate;
				detach _crate;
				_crate setPos ([_groundPosition select 0, _groundPosition select 1, 0]);
			};
		};
	}] call CBA_fnc_addEventHandler;
};

It's messy by all means, but perhaps the logic could be applied?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helicopter airdrop bugs out of the world
7 participants