<commit_before>// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
#define DURATION_STEP 1
#define DURATION_FAILED 5
//TODO: Fix the jerkiness (playMove vs switchMove)
private ["_length", "_animation", "_check", "_args", "_success", "_failure", "_complete", "_start", "_previousAnim"];

if a3w_actions_mutex exitWith {
	["You're already doing something!", DURATION_FAILED] call a3w_actions_notify;
};
a3w_actions_mutex = true;

_length = _this select 0;
_animation = _this select 1;
_check = _this select 2;
_args = _this select 3;

_complete = true;
_start = time;
_previousAnim = animationState player;
[player, _animation] call switchMoveGlobal;
_failed = false;

createDialog "ActionGUI";
disableSerialization;
_display = findDisplay 10101;
_display displayAddEventHandler ["KeyDown", "_this select 1 == 1;"];
_progressbar =  _display displayCtrl 10101;
_struct_text = _display displayCtrl 10102;
waitUntil {
	private ["_progress", "_result", "_text"];
	if (animationState player != _animation) then { [player, _animation] call switchMoveGlobal };
	if not a3w_actions_mutex then {
		_failed = true;<commit_msg>Desabilitado loop de animação MF para evitar o movimento na água e glitching da tela enquanto ativo<commit_after>// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.<EMAIL> *
// ******************************************************************************************
#define DURATION_STEP 1
#define DURATION_FAILED 5
//TODO: Fix the jerkiness (playMove vs switchMove)
private ["_length", "_animation", "_check", "_args", "_success", "_failure", "_complete", "_start", "_previousAnim"];

if a3w_actions_mutex exitWith {
	["You're already doing something!", DURATION_FAILED] call a3w_actions_notify;
};
a3w_actions_mutex = true;

_length = _this select 0;
_animation = _this select 1;
_check = _this select 2;
_args = _this select 3;

_complete = true;
_start = time;
_previousAnim = animationState player;
[player, _animation] call switchMoveGlobal;
_failed = false;

createDialog "ActionGUI";
disableSerialization;
_display = findDisplay 10101;
_display displayAddEventHandler ["KeyDown", "_this select 1 == 1;"];
_progressbar =  _display displayCtrl 10101;
_struct_text = _display displayCtrl 10102;
waitUntil {
	private ["_progress", "_result", "_text"];
	//if (animationState player != _animation) then { [player, _animation] call switchMoveGlobal };
	if not a3w_actions_mutex then {
		_failed = true;
{'fraction_non_alphanumeric': 0.2237410071942446, 'fraction_numerical': 0.023741007194244605, 'mean_word_length': 6.878186968838527, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2097996', 'n_tokens_mistral': 838, 'n_tokens_neox': 770, 'n_words': 255}