Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Closing door delete items on the ground #4839

Open
4 tasks done
Feeltz opened this issue Nov 17, 2024 · 1 comment
Open
4 tasks done

[Bug]: Closing door delete items on the ground #4839

Feeltz opened this issue Nov 17, 2024 · 1 comment
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet

Comments

@Feeltz
Copy link

Feeltz commented Nov 17, 2024

By submitting this bug issue, you agree to the following.

  • This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository
  • This bug has not been resolved in master branch
  • There is no existing issue for this bug already

Does this bug crash tfs?

no

Server Version

1.7 (Master), 1.4.x (Release)

Operation System

all (listed below)

OS Description

No response

Bug description

Auto closing door can delete item on the ground

Possible Pull Requests which are to blame

No response

Steps to reproduce

Best place to test it is on the real map is on Darashia Mino Tower
obraz

  1. Stand on auto closing door, that points downwoards, and the mailbox has to be below you (y+1)
  2. put items on the ground, under your character
  3. step out north, to trigger auto-close door

Code to reproduce the issue:
This part of the closing_door.lua is responsible for deleting items

local i, tileItem, tileCount = 1, true, tile:getThingCount()
while tileItem and i < tileCount do
        tileItem = tile:getThing(i)
        if tileItem and tileItem:getUniqueId() ~= item.uid and tileItem:getType():isMovable() then
	        tileItem:remove()
        else
	        i = i + 1
        end
end

if query ~= RETURNVALUE_NOERROR or query == RETURNVALUE_NOTENOUGHROOM then

It can be corelated with this issue: #4467 partialy fixed in here #4468

Actual Behavior

Items disappear. If you die on door SQM, your corpse will disappear. The problem is if the mailbox (or other solid item) is south or east from door. It should not happen because normally you can throw items on the mailbox.

Expected Behavior

Items are moved on the top of the mailbox or pushed oposite way if instead of mailbox is something like wall.

Backtrace

No response

@Feeltz Feeltz added bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet labels Nov 17, 2024
@github-project-automation github-project-automation bot moved this to Backlog in TFS 1.8 Nov 17, 2024
@Diego-OT
Copy link
Contributor

Instead of remove, just move it.

tileItem:moveTo(newPosition)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected behavior of code needs-confirmation not confirmed by a developer yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants