Skip to content
Snippets Groups Projects
Commit f7875275 authored by DarkGod's avatar DarkGod
Browse files

Fixed a bug that made mouse hard to move when targetting under the game log in some circumstances

parent daf050cc
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ function _M:init()
self.target.on_set_target = function(self, how)
if self.key ~= self.targetmode_key then return end
local dx, dy = game.level.map:moveViewSurround(self.target.x, self.target.y, 1, 1, true)
if how == "mouse" then
if how == "mouse" and (dx ~= 0 or dy ~= 0) then
local cx, cy = core.mouse.get()
core.mouse.set(cx - game.level.map.tile_w * dx, cy - game.level.map.tile_h * dy)
end
......
......@@ -74,7 +74,8 @@ function _M:on_register()
not profile.generic.modules_played or
not profile.generic.modules_played.tome or
profile.generic.modules_played.tome < 20 * 60 * 60
)
) and
not config.settings.cheat
then
game:unregisterDialog(self)
self.list[1]:fct()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment