Skip to content

Commit

Permalink
Fix issue with position calculation in move function (otland#4323)
Browse files Browse the repository at this point in the history
Co-authored-by: Taoprox <84152770+projectMWX@users.noreply.github.com>
  • Loading branch information
omarcopires and projectMWX committed Mar 17, 2023
1 parent 8192e0a commit 9473cc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/lib/core/position.lua
Expand Up @@ -35,7 +35,8 @@ function Position:moveUpstairs()
direction = DIRECTION_WEST
end

local position = self + Position.directionOffset[direction]
local position = Position(self)
position:getNextPosition(direction)
toTile = Tile(position)
if toTile and toTile:isWalkable() then
swap(self, position)
Expand Down

0 comments on commit 9473cc1

Please sign in to comment.