Skip to content

Commit

Permalink
fix closingdoor
Browse files Browse the repository at this point in the history
  • Loading branch information
MillhioreBT committed May 28, 2023
1 parent 3b59b7f commit a14d7a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/movements/scripts/closingdoor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ function onStepOut(creature, item, position, fromPosition)
if tile:getCreatureCount() > 0 then return true end

local newPosition = {x = position.x + 1, y = position.y, z = position.z}
local query = Tile(newPosition):queryAdd(creature)
local query = Tile(newPosition):queryAdd(creature, FLAG_IGNOREBLOCKCREATURE)
if query ~= RETURNVALUE_NOERROR or query == RETURNVALUE_NOTENOUGHROOM then
newPosition.x = newPosition.x - 1
newPosition.y = newPosition.y + 1
query = Tile(newPosition):queryAdd(creature)
query = Tile(newPosition):queryAdd(creature, FLAG_IGNOREBLOCKCREATURE)
end

if query == RETURNVALUE_NOERROR or query ~= RETURNVALUE_NOTENOUGHROOM then
Expand Down

0 comments on commit a14d7a9

Please sign in to comment.