Merge remote-tracking branch 'refs/remotes/origin/experimental'

This commit is contained in:
DESKTOP-UH65DCE\MusTanG
2017-07-25 15:21:10 -05:00
2 changed files with 63 additions and 25 deletions

View File

@ -108,9 +108,9 @@ while {ExileClientConstructionResult isEqualTo 0} do
ExileClientConstructionPossibleSnapPositions = [];
ExileClientConstructionCurrentSnapToObject = objNull;
_position = getPosATL player;
_position set [2, -500];
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
_vectorDirection = _newDirAndUp select 0;
_position set [2, -500];
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
_potentionalSnapObject = cursorTarget;
if !(isNull _potentionalSnapObject) then
{
@ -133,19 +133,15 @@ while {ExileClientConstructionResult isEqualTo 0} do
}
else
{
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
_vectorDirection = _newDirAndUp select 0;
_vectorUp = _newDirAndUp select 1;
ExileClientConstructionObject setVectorDirAndUp [_vectorDirection,_vectorUp];
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
ExileClientConstructionObject setPosATL _position;
ExileClientConstructionObject attachTo [ExileClientConstructionCurrentSnapToObject,ExileClientConstructionOffset];
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
{
if (_x distance _position < 1) exitWith
{
_position = _x;
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
_vectorDirection = _newDirAndUp select 0;
_rotation = (ExileClientConstructionRotation + (getDir ExileClientConstructionCurrentSnapToObject) + 360) % 360;
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
_vectorUp = vectorUp ExileClientConstructionCurrentSnapToObject;
ExileClientConstructionIsSnapped = true;
};

View File

@ -75,26 +75,68 @@ switch (_keyCode) do
{
if (ExileClientIsInConstructionMode) then
{
_step = 1;
if(_shiftState)then{_step = 3;};
if(_controlState)then{_step = 0.5;};
if(_altState)then{ _step = 0.25;};
BuildVecYaw = (((BuildVecYaw - _step)min 360) max -360);
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
if!(ExileClientConstructionMode isEqualTo 3)then
{
_step = 1;
if(_shiftState)then{_step = 3;};
if(_controlState)then{_step = 0.5;};
if(_altState)then{ _step = 0.25;};
BuildVecYaw = (((BuildVecYaw - _step)min 360) max -360);
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
}
else
{
_step = 45;
if (_shiftState) then
{
_step = 90;
}
else
{
if (_controlState) then
{
_step = 22.5;
};
};
ExileClientConstructionRotation = (ExileClientConstructionRotation - _step + 360) % 360;
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
};
};
};
case 0x12:
{
if (ExileClientIsInConstructionMode) then
{
_step = 1;
if(_shiftState)then{_step = 3;};
if(_controlState)then{_step = 0.5;};
if(_altState)then{ _step = 0.25;};
BuildVecYaw = (((BuildVecYaw + _step)min 360) max -360);
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
if!(ExileClientConstructionMode isEqualTo 3)then
{
_step = 1;
if(_shiftState)then{_step = 3;};
if(_controlState)then{_step = 0.5;};
if(_altState)then{ _step = 0.25;};
BuildVecYaw = (((BuildVecYaw + _step)min 360) max -360);
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
}
else
{
_step = 45;
if (_shiftState) then
{
_step = 90;
}
else
{
if (_controlState) then
{
_step = 22.5;
};
};
ExileClientConstructionRotation = (ExileClientConstructionRotation + _step + 360) % 360;
[] call ExileClient_gui_constructionMode_update;
_stopPropagation = true;
};
};
};
case 0x47: