-
Notifications
You must be signed in to change notification settings - Fork 55
CChar: added ResetVisualRange method #1464
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
base: dev
Are you sure you want to change the base?
Conversation
To reset visual range in case supporting client versions before and after VisualRange support
|
Interesting fix! |
|
Good idea, though i see some potential issues i'd like to discuss with the currently proposed implementation. This is resetting the visualrange to the default value at login everytime for everyone with any client version, right? This will force change the value, which could be undesired. |
It is not possible to check the client version every time, because it does not depend only on the client version → some clients allow changing the visual range through configuration. The flow is as follows:
Older clients without visual range support do not send a SetVisualRange packet, so the visual range value on CChar never changes. The problem with your proposed solution is that when you call the SetVisualRange method on CChar, it automatically triggers sending a SetVisualRange packet to the client. With older clients, this works correctly. But clients with visual range support process this packet and set their visual range to that value, e.g. 18. |
To reset visual range in case supporting client versions before and after VisualRange support
When firstly log in using client supporting VisualRange option and the max view distance is set to > 18 CChar will set
m_iVisualRangeto this value. Then after logging in using client with max distance 18 (f.e. 2.0.0) the VisualRange packet is not sent thus the value is not set and therefore this client is not displaying incoming objects. Resetting this value after selecting character fixes this bug.