|
|
@ -52,7 +52,7 @@ local function calculate_rotating_state(player, data) |
|
|
|
local num = math_round(r.x * r.x + r.y * r.y + r.z * r.z) -- Squared length. |
|
|
|
local num = math_round(r.x * r.x + r.y * r.y + r.z * r.z) -- Squared length. |
|
|
|
if num == 1 then state.mode = "face" |
|
|
|
if num == 1 then state.mode = "face" |
|
|
|
elseif num == 2 then state.mode = "edge"; state.axis = state.face:cross(r) |
|
|
|
elseif num == 2 then state.mode = "edge"; state.axis = state.face:cross(r) |
|
|
|
elseif num == 3 then state.mode = "mirror"; degrees = 120 |
|
|
|
elseif num == 3 then state.mode = "corner"; degrees = 120 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- Sneaking causes the direction of the rotation to be inverted. |
|
|
|
-- Sneaking causes the direction of the rotation to be inverted. |
|
|
|