mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
More fixes and edits!
* Fixed a bug with client_exit module button appearing on full reload. * Fixed the battle window to work properly now (left click: attack, right click: menu). * Added auto walk checker for more accurate aut walking: - It will always find the path now, except in rare occasions gets stuck running back and forward - Re-calculates path every 10 steps and also when you hit an object that cancels your step. - Right now this is just a temporary method. - Cancels the checker when you move or press escape (has to be done client-side). * Added a new setting to UIComboBox class 'mouse-scroll' to enable/disable mouse wheel scrolling. * Added support for no ping in cooldowns. * Added missing PlayerStates (hungry and bleeding).
This commit is contained in:
@@ -382,12 +382,8 @@ function onMinimapMouseRelease(self, mousePosition, mouseButton)
|
||||
end
|
||||
local pos = self:getPosition(mousePosition)
|
||||
if pos and mouseButton == MouseLeftButton and self:isPressed() then
|
||||
local dirs = g_map.findPath(g_game.getLocalPlayer():getPosition(), pos, 127, PathFindFlags.AllowNullTiles)
|
||||
if #dirs == 0 then
|
||||
modules.game_textmessage.displayStatusMessage(tr('There is no way.'))
|
||||
return true
|
||||
end
|
||||
g_game.autoWalk(dirs)
|
||||
local player = g_game.getLocalPlayer()
|
||||
if not player:autoWalk(pos) then return false end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
Reference in New Issue
Block a user