Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

Quick Stack range is shortened by range check #2885

Closed boddyn closed 1 year ago

boddyn commented 1 year ago

Reproduction steps (if applicable)?

  1. Go to an isolated area.
  2. Place a chest down and place gray bricks in it, leaving some in your personal inventory.
  3. Walk a distance away using the ruler tool.
  4. While, say, 35 tiles away, open your inventory.
  5. Click the "Quick Stack to Nearby Chests" button.
  6. Observe that the gray bricks in your inventory do not quick stack to the chest.

Any stack traces or error messages (if known)?

None, nor would I expect any.

Any screenshots?

image Fig. 1 - Showing setup of inventories. image Fig. 2 - At range of 35 tiles, quick stacking to nearby chests does not work. image Fig. 3 - Now at a range of 32. image Fig. 4 - At the range of 32, you can now quick stack to the chest.

sgkoishi commented 1 year ago

Actually, this check is unnecessary. The client only sends the slot, and the server determines which chest to use and checks for the range (Distance(player, chest) < 600) before this hook.

600 = 37.5 tiles