Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

Screensize Y #1066

Open Krykankrs opened 1 year ago

Krykankrs commented 1 year ago

Screensize function isnt give correct value on Y direction.

Jhobean commented 1 year ago

Check #630

drk84 commented 1 year ago

What resolution you used?

Krykankrs commented 1 year ago

Not fix, flexible. But Y coordinate bigger than 480.

drk84 commented 1 year ago

I need to know what resolution you used, the Y packet sent by the clietn is not properly sent

canerksk commented 1 year ago

What is a client? ClassicUO, OrionUO or original? When the client is first turned on, it will not receive this data from the sphere if you have not send any changes to the screen size. First you have to make a change and exit the game once. It depends on the client version and type you are using. This is entirely a client issue. In other words, the client receives and sends this data correctly only at inputs and outputs. It does not take the moment you change the screen size.,

Let's give an example of ClassicUO;

The packet code sent the moment you change this screen size: WorldViewportGump mouseup: image

This is the moment of sending the screen size when you log in to the game: EnterWorld function image

If you want it to be sent instantly when you change the screen size via ClassicUO options, you need to add a line like this under the ClassicUO options apply function. This event does not exist in the original client. image

But this status is only sent to EnterWorld for the original client. It is not sent as soon as changes are made via Options.

For example, ClassicUO also needs to be sent at the time of options apply. But this is not added in ClassicUO. Therefore, spheres will not be aware of the changes made via options. It will be sent only when you enter the game and when you pull the button in the lower right corner of the game screen.

The above codes are examples and referenced ClassicUO.

Krykankrs commented 1 year ago

I use ClassicUO and resolution is 1542x1023.

Screenshot_2 Screenshot_3

Like that.

xwerswoodx commented 1 year ago

Can you try that sphere to see if works fine. Because as we can't do anything while Y value not sent by default clients we have to set default values but if your ClassicUO works fine I can add a Y == 0 condition to not set Y value on default values so, can you test that version and see if it works for you.

https://www.mediafire.com/file/1uls29llqyri55b/SphereSvrX64_nightly.rar/file

canerksk commented 1 year ago

This packet content works a little strangely, the Original client only sends the width value of the screen size, not the height, but since the ClassicUO client sends both height and width, the x and y data coming to the sphere are mixed. There are skips in between. This may be related to sphere's package content/length. The problem persists.

image

Here, there are 2 data in the package content of the original client, There are 4 data in the package content of ClassicUO client. The problem stems from here. (also at ClassicUO)