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

Targeting refreshes whole map #1333

Closed
flambard-took opened this issue Aug 15, 2019 · 0 comments
Closed

Targeting refreshes whole map #1333

flambard-took opened this issue Aug 15, 2019 · 0 comments

Comments

@flambard-took
Copy link
Member

As reported by Zal, executing a macro like \ef1*tf1*tf1*tf1*tf1*tf1*t could disconnect the client with "Write error", meaning the buffer has overflowed.

Turns out, it's the *t part, that's being the culprit here.

There are many calls to handle_stuff() from within the targeting routine, that transform scheduled updates into actual (sock)buffer writes. Also, each time player tries to target something, we call adjust_panel() to see if that something is off-screen. Meanwhile, the adjust_panel() function sets p_ptr->redraw |= PR_MAP each time it's called (because it's buggy).

Net result: whole dungeon map is re-sent on each *t call.

The short-term fix is to fix adust_panel(), long-term, we shall probably remove some of the update flushes from the targeting routine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant