Skip to content

Commit 988e7d5

Browse files
committed
🎈 perf: 优化 lite 版
快速开镜模式下,放开右键自动开关一次物品栏,重置光标位置
1 parent 3fea5db commit 988e7d5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Soldier76-lite.lua

+8-4
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ function Main (event, arg, family)
108108

109109
-- 当鼠标移到底部,距离底部小于安全距离时,调整到顶部 (小于安全距离会影响下一次计算)
110110
if (y >= 65535 - safeDistance) then
111-
MoveMouseTo(x, 1)
112-
RunningCache.lastY = 1
111+
-- MoveMouseTo(x, 1)
112+
-- RunningCache.lastY = 1
113+
break
113114
end
114115

115116
-- ClearLog()
@@ -120,9 +121,12 @@ function Main (event, arg, family)
120121
RunningCache.deviationPX = 0
121122
RunningCache.deviationCounterPX = 0
122123

124+
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 3 and family == "mouse" then
123125
-- -- 重置鼠标位置
124-
-- PressAndReleaseKey('tab')
125-
-- PressAndReleaseKey('tab')
126+
if (not IsPressed(1) and not IsPressed(3)) then
127+
PressAndReleaseKey('tab')
128+
PressAndReleaseKey('tab')
129+
end
126130
end
127131
end
128132

0 commit comments

Comments
 (0)