mirror of
https://github.com/ravmustang/eXpochVectorBuild4Exile.git
synced 2024-08-30 17:22:11 +00:00
Merge remote-tracking branch 'refs/remotes/origin/experimental'
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user