Skip to content

Commit 4ba66c7

Browse files
committed
Revert "freecam: Fix lint warnings"
This reverts commit 821d5bd.
1 parent f48648d commit 4ba66c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

[editor]/freecam/freecam.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ local controlToKey = {
4040
["vehicle_right"] = "d",
4141
}
4242

43+
local mouseFrameDelay = 0
44+
4345
local mta_getKeyState = getKeyState
4446
function getKeyState(key)
4547
if isMTAWindowActive() then
@@ -219,6 +221,7 @@ end
219221
-- Internal state (module-level)
220222
local mouseFrameDelay = 0 -- frames to ignore after cursor/window toggles
221223
local accumDX, accumDY = 0, 0 -- accumulated raw mouse deltas (pixels)
224+
local lastEventTick = 0
222225
local PI, RAD = math.pi, math.pi / 180
223226

224227
-- Tunables (adjust to taste)
@@ -278,6 +281,7 @@ function freecamMouse(cX, cY, aX, aY)
278281
-- Accumulate; application to rot happens in freecamMouseApply() every frame
279282
accumDX = accumDX + dx
280283
accumDY = accumDY + dy
284+
lastEventTick = getTickCount()
281285
end
282286

283287
function freecamMouseApply(deltaTime)

0 commit comments

Comments
 (0)