Skip to content
Snippets Groups Projects
Commit 1e8669d4 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@6200 51575b47-30f0-44d4-a5cc-537603b46e54
parent c9778257
No related branches found
No related tags found
No related merge requests found
......@@ -417,9 +417,8 @@ function _M:aiCanPass(x, y)
for _, side in ipairs(check_order) do
local check_dir = sides[side]
local sx, sy = util.coordAddDir(target.x, target.y, check_dir)
if target:canMove(sx, sy) then
if target:canMove(sx, sy) and target:move(sx, sy) then
game.logSeen(target, "%s shoves %s forward.", self.name:capitalize(), target.name)
target:move(sx, sy, true)
target.shove_pressure = nil
target._last_shove_pressure = nil
break
......
......@@ -728,7 +728,7 @@ function _M:createDisplay()
if self.no_tooltip then
self.c_desc:erase()
self.c_desc:switchItem(str, str, true)
else
elseif self.b_stat.last_display_x then
game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str)
end
end}
......@@ -737,7 +737,7 @@ function _M:createDisplay()
if self.no_tooltip then
self.c_desc:erase()
self.c_desc:switchItem(str, str, true)
else
elseif self.b_stat.last_display_x then
game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str)
end
end}
......@@ -746,7 +746,7 @@ function _M:createDisplay()
if self.no_tooltip then
self.c_desc:erase()
self.c_desc:switchItem(str, str, true)
else
elseif self.b_stat.last_display_x then
game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str)
end
end}
......@@ -755,7 +755,7 @@ function _M:createDisplay()
if self.no_tooltip then
self.c_desc:erase()
self.c_desc:switchItem(str, str, true)
else
elseif self.b_stat.last_display_x then
game:tooltipDisplayAtMap(self.b_stat.last_display_x + self.b_stat.w, self.b_stat.last_display_y, str)
end
end}
......
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