<commit_before>//	@file Name: forceEject.sqf
//	@file Author: AgentRev

if (!alive player) exitWith {};

private ["_veh", "_push", "_vel"];

_veh = vehicle player;
if (_veh == player) exitWith {};

moveOut player;

if (_veh isKindOf "Plane") then
{
	if (!isTouchingGround _veh) then
	{
		player setDir getDir _veh;
		_push = [vectorUp _veh, 40] call BIS_fnc_vectorMultiply; // Simulate rocket seat ejection
	};
}
else
{
	if ((getPos _veh) select 2 > 4) then
	{
		_push = [([getPosASL _veh, getPosASL player] call BIS_fnc_vectorDiff) call BIS_fnc_unitVector, 5] call BIS_fnc_vectorMultiply; // Push 5m/s away from vehicle
	};
};

if (!isNil "_push") then
{
	player setVelocity ((velocity player) vectorAdd _push);
};
<commit_msg>Converted BIS_fnc_vectorDiff to vectorDiff (cherry picked from commit A3Wasteland/ArmA3_Wasteland.Altis@f6ede09e81ae876ce47d53f0e47b94b1bd66bd89)<commit_after>//	@file Name: forceEject.sqf
//	@file Author: AgentRev

if (!alive player) exitWith {};

private ["_veh", "_push", "_vel"];

_veh = vehicle player;
if (_veh == player) exitWith {};

moveOut player;

if (_veh isKindOf "Plane") then
{
	if (!isTouchingGround _veh) then
	{
		player setDir getDir _veh;
		_push = [vectorUp _veh, 40] call BIS_fnc_vectorMultiply; // Simulate rocket seat ejection
	};
}
else
{
	if ((getPos _veh) select 2 > 4) then
	{
		_push = [((getPosASL _veh) vectorDiff (getPosASL player)) call BIS_fnc_unitVector, 5] call BIS_fnc_vectorMultiply; // Push 5m/s away from vehicle
	};
};

if (!isNil "_push") then
{
	player setVelocity ((velocity player) vectorAdd _push);
};

{'fraction_non_alphanumeric': 0.12563451776649745, 'fraction_numerical': 0.02284263959390863, 'mean_word_length': 4.797794117647059, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2108307', 'n_tokens_mistral': 638, 'n_tokens_neox': 594, 'n_words': 171}