2015-07-28 04:11:29 +00:00
|
|
|
/**
|
|
|
|
* fnc_headbugfix.sqf
|
|
|
|
* @Descr: Fixes animation issues that may get you stuck
|
|
|
|
* @Author: rocko
|
|
|
|
*
|
|
|
|
* @Arguments:
|
|
|
|
* @Return: nil
|
|
|
|
* @PublicAPI: true
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
2015-07-28 20:56:22 +00:00
|
|
|
private ["_pos","_dir","_anim"];
|
2015-07-28 20:06:58 +00:00
|
|
|
if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {};
|
2015-07-28 04:11:29 +00:00
|
|
|
titleCut ["", "BLACK"];
|
|
|
|
_pos = getposATL player;
|
2015-07-28 20:56:22 +00:00
|
|
|
_dir = getDir player;
|
|
|
|
_anim = animationState player;
|
2015-07-28 04:11:29 +00:00
|
|
|
// create invisible headbug fix vehicle
|
|
|
|
_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL player, [], 0, "NONE"];
|
2015-07-28 20:56:22 +00:00
|
|
|
_ACE_HeadbugFix setDir _dir;
|
|
|
|
player moveInAny _ACE_HeadbugFix;
|
2015-07-28 04:11:29 +00:00
|
|
|
sleep 1.0;
|
|
|
|
unassignVehicle player;
|
|
|
|
player action ["Eject", vehicle player];
|
|
|
|
sleep 1.0;
|
|
|
|
deleteVehicle _ACE_HeadbugFix;
|
|
|
|
player setposATL _pos;
|
2015-07-28 20:56:22 +00:00
|
|
|
player setDir _dir;
|
2015-07-28 04:11:29 +00:00
|
|
|
titleCut ["", "PLAIN"];
|
|
|
|
|