Page MenuHomeFeedback Tracker

Ejection bug leaves user input disabled
Acknowledged, NormalPublic

Description

Excerpt from functions_f_jets\Functions\Ejection\fn_planeEjection.sqf:

//deploy parachute
if (isPlayer _pilot) then
{
	disableUserInput true;
};

private _parachute = createvehicle [_ejectionParachute,getPos _ejectionSeat,[],0,"CAN_COLLIDE"];
_parachute setPosWorld (_ejectionSeat modelToWorldWorld [0,0,2.5]);
_parachute setDir getDir _ejectionSeat;
waitUntil
{
	_pilot moveInDriver _parachute;
	_pilot in _parachute
};
if !(_pilot in _parachute) then
{
	_pilot moveInDriver _parachute;
};
_parachute lock 2;

sleep 1;	//to make sure parachute is locked and player cannot use Get Out ;(

if (isPlayer _pilot) then
{
	disableUserInput false;
};

In the code above, user input is disabled before parachute deployment, and re-enabled afterwards. However, sometimes the parachute spawns in a bugged state and moveInDriver fails on every attempt. This causes the script to stays stuck in the waitUntil loop indefinitely, preventing the user from regaining input, requiring to terminate the game. A simple workaround is adding a 2-second timeout to waitUntil:

_time = time;
waitUntil
{
	_pilot moveInDriver _parachute;
	_pilot in _parachute || time - _time > 2
};

Never create a synchronous wait condition without a timeout.

Details

Severity
Minor
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

AgentRev created this task.Apr 8 2018, 12:56 AM
AgentRev updated the task description. (Show Details)Apr 8 2018, 12:58 AM
AgentRev updated the task description. (Show Details)Apr 8 2018, 1:07 AM
Wulf changed the task status from New to Acknowledged.Apr 17 2018, 1:19 PM
Wulf added a subscriber: Wulf.

Hello.

Thank you for the report, we will see what can be done.