Fix #57: remove writing to global variable in smooth.linear

This commit is contained in:
vrld 2015-11-27 10:34:38 +01:00
parent 2cf3f19ff0
commit 2de9a30153

View File

@ -42,7 +42,7 @@ function camera.smooth.linear(speed)
return function(dx,dy, s)
-- normalize direction
local d = math.sqrt(dx*dx+dy*dy)
dts = math.min((s or speed) * love.timer.getDelta(), d) -- prevent overshooting the goal
local dts = math.min((s or speed) * love.timer.getDelta(), d) -- prevent overshooting the goal
if d > 0 then
dx,dy = dx/d, dy/d
end