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
Chatbox spam by weird characters #557
Comments
This exists in endless other programs too and has something to do with special control characters. |
I think it might be a good idea to include a fix for this in freeroam. |
I doubt that freeroam is the only gamemode in official resources with its own chathandler.. Also, if you think fixing it in resources is the proper approach, then maybe we should add it regardless of official gamemode, which means we'd be adding chathandlers to any gamemode that does not have it. |
Previously the render bounds for a singular chat line would be the entire chat render bounds. Now the render bounds for a singular chat line are: - left: chat line x - top: chat line y - right: entire chat right - bottom: chat line y + chat line height Also fixes a minor off-by-one logical error in CChat::DrawTextString relating to render boundaries.
Reproducible using: My initial reasoning for fixing this in resources is that I don't think we shouldn't attempt to "fix" text with excessive diacritics as we cannot guarantee we are affecting legitimate use. A proper fix is to crop text rendering instead, as detailed below. This can be fixed by ensuring This issue can be hackily fixed by changing line 1120 of (*iter).Draw(..., RenderBounds); to: (*iter).Draw(..., CRect2D(vecPosition.fX, vecPosition.fY, RenderBounds.fY1, vecPosition.fY+13)); This is obviously not a suitable fix as The Two options:
|
Previously the render bounds for a singular chat line would be the entire chat render bounds. Now the render bounds for a singular chat line are: - left: chat line x - top: chat line y - right: entire chat right - bottom: chat line y + chat line height Also fixes a minor off-by-one logical error in CChat::DrawTextString relating to render boundaries.
Describe the bug
Recently some players found out how to spam -every- MTA chatbox with a weird symbol.
See the screenshot for an example.
To reproduce
Unknown as the mantis report did not contain the stated characters but the lua code below might help.
Expected behaviour
Screenshots
Version
Additional context
StuartUK:
This should remove allot of it they are most of the characters I found
From https://bugs.mtasa.com/view.php?id=8114
The text was updated successfully, but these errors were encountered: