Skip to content

Commit

Permalink
Fix stackpos for getThingFromPos (otland#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbjorkholm authored and marksamman committed Aug 22, 2016
1 parent 84a3382 commit ceef160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/lib/compat/compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ function getThingfromPos(pos)
end

local thing
local stackpos = pos.stackpos or 0
if stackpos == STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE then
thing = tile:getTopCreature()
if thing == nil then
Expand All @@ -888,7 +889,7 @@ function getThingfromPos(pos)
elseif stackpos == STACKPOS_TOP_CREATURE then
thing = tile:getTopCreature()
else
thing = tile:getThing(pos.stackpos)
thing = tile:getThing(stackpos)
end
return pushThing(thing)
end
Expand Down

0 comments on commit ceef160

Please sign in to comment.