diasurgical / devilutionX

Diablo build for modern operating systems
Other
7.7k stars 751 forks source link

[Issue Report]: (Android) Item destroyed when placed during lag #7152

Open sdm519 opened 2 weeks ago

sdm519 commented 2 weeks ago

Operating System

Android

DevilutionX version

1.5.2

Describe

Items disappear and are essentially destroyed if placed at same time as a lag spike.

After picking up an item from your inventory, it will change your cursor until you place an item down in inventory, equip it, or drop it out of inventory. If you click to place it down at the same time as a lag spike, the cursor reverts to normal, the item disappears and is permanently gone.

To Reproduce

  1. Join game on ZeroNet with user that causes a lag spike every 5-10 seconds.
  2. Open inventory and pick up an item so it becomes your cursor
  3. Place the item back down in an open spot in the inventory at the exact moment of a lag spike
  4. Notice the cursor reverts and the item permanently disappears

Expected Behavior

The cursor does not revert until the item is placed. Items should never spontaneously disappear.

Additional context

Related to similar issue https://github.com/diasurgical/devilutionX/issues/7151#issue-2367734846

My suspicion is that cursors lose their current state if the state attempts to change at the moment a lag spike occurs. There are likely more manifestations of this.

StephenCWills commented 2 weeks ago

Reproduced in a TCP game using a gamepad on Windows x64.

ErickN13 commented 2 weeks ago

Isso aconteceu comigo hoje!

qndel commented 2 weeks ago

Isso aconteceu comigo hoje!

we speak english here, so either comment in english or don't comment at all

ErickN13 commented 2 weeks ago

Ok bro