Update snap and vector build

Mady by @Victor-the-Cleaner
This commit is contained in:
A Man
2021-12-23 16:49:02 +01:00
parent c4a2e1b88f
commit 16361e5466
11 changed files with 839 additions and 567 deletions

View File

@@ -1,10 +1,10 @@
/*-----------------------------------*/
// by strikerforce //
/*--------------------------------*/
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Author: strikerforce
//
///////////////////////////////////////////////////////////////////////////////////////////////////
private ["_todo", "_selected"];
_todo = _this select 3 select 2;
local _todo = _this select 3 select 2;
if (_todo == 0) then {
vectorActionState = _this select 3 select 0;
@@ -17,59 +17,59 @@ if (_todo == 0) then {
};
};
_selected = _this select 3 select 3;
local _selected = _this select 3 select 3;
if (_todo == 1 || {_todo == 0}) then {
if ((_todo == 1) || (_todo == 0)) then {
call {
if (vectorActionState == "Init") exitwith {
if (vectorActionState == "Init") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_OPEN";
[1,0] call fnc_vectorActionCleanup;
[] spawn {
while {1==1} do {
if (DZE_cancelBuilding || {!dayz_actionInProgress}) exitWith {
if (DZE_cancelBuilding || !dayz_actionInProgress || DZE_nowBuilding) exitWith {
[0,0] call fnc_vectorActionCleanup;
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
};
uisleep 2;
uiSleep 0.5;
};
};
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_OPEN") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_OPEN") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_OPEN";
[1,0] call fnc_vectorActionCleanup;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_FORWARD") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_FORWARD") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
DZE_updateVec = true;
DZE_memForBack = DZE_memForBack + (DZE_curDegree * -1);
DZE_memForBack = DZE_memForBack - DZE_curDegree;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_BACK") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_PITCH_BACK") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
DZE_updateVec = true;
DZE_memForBack = DZE_memForBack + DZE_curDegree;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_LEFT") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_LEFT") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
DZE_updateVec = true;
DZE_memLeftRight = DZE_memLeftRight + (DZE_curDegree * -1);
DZE_memLeftRight = DZE_memLeftRight - DZE_curDegree;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_RIGHT") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_BANK_RIGHT") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
DZE_updateVec = true;
DZE_memLeftRight = DZE_memLeftRight + DZE_curDegree;
};
if (vectorActionState == localize "STR_EPOCH_VECTORS_RESET") exitwith {
if (vectorActionState == localize "STR_EPOCH_VECTORS_RESET") exitWith {
vectorActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_vectorActionCleanup;
DZE_memForBack = 0;
@@ -80,32 +80,32 @@ if (_todo == 1 || {_todo == 0}) then {
};
};
if (_todo == 2 || {_todo == 0}) then{
if ((_todo == 2) || (_todo == 0)) then{
call {
if (degreeActionState == "Init") exitwith {
if (degreeActionState == "Init") exitWith {
degreeActionState = localize "STR_EPOCH_VECTORS_OPEN";
[1,0] call fnc_degreeActionCleanup;
[] spawn {
while {1==1} do {
if (DZE_cancelBuilding || {!dayz_actionInProgress}) exitWith {
if (DZE_cancelBuilding || !dayz_actionInProgress || DZE_nowBuilding) exitWith {
[0,0] call fnc_degreeActionCleanup;
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
};
uisleep 2;
uiSleep 0.5;
};
};
};
if (degreeActionState == localize "STR_EPOCH_VECTORS_OPEN") exitwith {
if (degreeActionState == localize "STR_EPOCH_VECTORS_OPEN") exitWith {
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
[1,1] call fnc_degreeActionCleanup;
};
if (degreeActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitwith {
if (degreeActionState == localize "STR_EPOCH_VECTORS_CLOSE") exitWith {
degreeActionState = localize "STR_EPOCH_VECTORS_OPEN";
[1,0] call fnc_degreeActionCleanup;
};
if (degreeActionState == "SELECT") exitwith {
if (degreeActionState == "SELECT") exitWith {
degreeActionState = localize "STR_EPOCH_VECTORS_CLOSE";
DZE_curDegree = _selected;
[1,1] call fnc_degreeActionCleanup;