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

[Issue Report]: Ctrl+Click can delete items when the player is moving #6937

Open
StephenCWills opened this issue Feb 4, 2024 · 2 comments · May be fixed by #7006
Open

[Issue Report]: Ctrl+Click can delete items when the player is moving #6937

StephenCWills opened this issue Feb 4, 2024 · 2 comments · May be fixed by #7006
Labels
bug Something isn't working

Comments

@StephenCWills
Copy link
Member

StephenCWills commented Feb 4, 2024

Operating System

Windows x64

DevilutionX version

Custom build (please specify commit ID)

Describe

Tested using commit ID: 560aeac
Seems to be present in 1.5.1 as well

There appear to be three conditions to reproduce the bug.

  • The player is moving in a non-southward direction (W/NW/N/NE/E)
  • The player is leaving a tile from which they cannot drop an item on the ground because it's surrounded by other items or obstacles
  • The player is entering a tile from which they can drop an item

If you Ctrl+Click an item in the player's inventory at a moment when all these conditions are met, the item will be deleted without a trace.

To Reproduce

  1. Load the following save: single_0.sv.zip
  2. Open the character's inventory
  3. Move the character to the West, Northwest, North, Northeast, or East
  4. Before the character has fully escaped the tile they started in, use Ctrl+Click to drop Gotterdamerung

Because the character must be moving in order to reproduce the bug, timing is crucial. I found it helpful to reduce the game speed to 5 in diablo.ini.

Expected Behavior

The item should either be dropped on the ground or kept on the player's cursor.

Additional context

Bug is demonstrated in the following video.

DevilutionX.2024-02-01.17-15-59.mp4
@julealgon
Copy link
Contributor

Is this in any way related to how knockback behaves when walking north vs south? Has that been made consistent yet or no?

The way you describe it seems like it could have the exact same root cause. Would be nice if the logic could be unified somehow (if it isn't already).

@StephenCWills
Copy link
Member Author

I'm sure it's related, but I don't know if I'd say they share a root cause. It probably just indicates that the logic to find a place on the ground to drop the item uses the dPlayer array.

@kphoenix137 kphoenix137 linked a pull request Mar 7, 2024 that will close this issue
@kphoenix137 kphoenix137 added the bug Something isn't working label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants